-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
importlib.abc.Traversable.read_text()
incompatible with importlib.resources._functional.read_text()
usage (Python 3.13)
#127012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hey @kurtmckee I can work on this issue ...can you assign me. |
@kanishka-coder0809 As I wrote in the text above, I'd like to fix this myself but I'm waiting for confirmation how to proceed, because I think this issue implicates In any case, I don't have GitHub permissions to assign this to anyone. |
I'm encountering this issue while trying to add 3.13 support to PyTorch. |
Thanks Kurt for the detailed report elucidating the issue. I do think I agree that adding the required parameter to the default When reasoning about where to create the fix, I'm fine if it goes here or in At first, I was thinking that this change would be backward-incompatible, because it's a change to a protocol (on which downstream consumers rely), but since it's a change to a concrete method on the protocol, I'm thinking a backward-compatible change is possible, but we'll want to think carefully about that aspect of the change. Please feel free to proceed with a proposed fix. |
@jaraco Understood. I'll work to introduce a PR to the |
This adds an in-memory finder, loader, and traversable implementation, which allows the `Traversable` protocol and concrete methods to be tested. This additional infrastructure demonstrates python/cpython#127012, but also highlights that the `Traversable.joinpath()` concrete method raises `TraversalError` which is not getting caught in several places.
`importlib_resources.read_text()` calls the `Traversable.read_text()` concrete method with an `errors` argument that doesn't exist in the method signature, resulting in an `TypeError`. This is resolved by adding an `errors` parameter to `Traversable.read_text()`. Fixes python/cpython#127012
That's fine, but we also need to remove the call that passes it, since code already exists that can't receive the parameter. Changing the protocol requires a deprecation cycle and can't be backported. Adding a new (optional) method that also accepts |
@zooba I'm (possibly overly) cautious to take action without more direction. Should I submit a PR to this repo to remove the additional parameters from the call? Should I submit a separate PR to the I'm willing to do the work! I simply want to avoid botching something due to lack of experience in the |
A PR to |
This adds an in-memory finder, loader, and traversable implementation, which allows the `Traversable` protocol and concrete methods to be tested. This additional infrastructure demonstrates python/cpython#127012, but also highlights that the `Traversable.joinpath()` concrete method raises `TraversalError` which is not getting caught in several places.
Re-opening to track the merge from importlib_resources to cpython. |
|
….4.5 to version 6.5.2 Anderson Bravalheri (1): Bump pre-commit hook for ruff to avoid clashes with pytest-ruff (jaraco/skeleton#150) Avasam (1): Fix an incompatibility (and source of merge conflicts) with projects using Ruff/isort. Jason R. Coombs (26): Remove workaround for sphinx-contrib/sphinx-lint#83 Allow the workflow to be triggered manually. Add Python 3.13 and 3.14 into the matrix. (jaraco/skeleton#146) Add workaround for broken importlib.resources when an editable sentinel is present. Separate bpo from Python issue numbers. gh-123994: Generate utf-16 file using little endian and BOM. (#123995) 👹 Feed the hobgoblins (delint). Add Python 3.13 and 3.14 into the matrix. (jaraco/skeleton#151) Include pyproject.toml in ruff.toml. Require Python 3.9 or later now that Python 3.8 is EOL. Use extend for proper workaround. 👹 Feed the hobgoblins (delint). Remove unused imports. Bump badge for 2025. Re-enable type checks. Apply import sort fixers from ruff. Add type annotations for Traversable.open. Remove Python 3.8 compatibility code. Finalize Consolidate MemoryTraversable._resolve. Replace unreachable block with simple assertion. Fixes diffcov failure. Add news fragment. Finalize Rely on Literal from stdlib. Add news fragment. Finalize Kurt McKee (3): Demonstrate python/cpython#127012 Catch `TraversalError`, raised by `Traversable.joinpath()` Resolve a `TypeError` lurking in the `read_text()` functional API Peter St. John (2): Add typing-extensions as a dependency Update pyproject.toml Petr Viktorin (1): gh-123085: _compile_importlib: Avoid copying sources before compilation (GH-124131)
Bumps the all group with 9 updates in the / directory: | Package | From | To | | --- | --- | --- | | [pydantic](https://github.com/pydantic/pydantic) | `2.10.4` | `2.10.6` | | [pypdf](https://github.com/py-pdf/pypdf) | `5.1.0` | `5.3.0` | | [black](https://github.com/psf/black) | `24.10.0` | `25.1.0` | | [flake8](https://github.com/pycqa/flake8) | `7.1.1` | `7.1.2` | | [importlib-resources](https://github.com/python/importlib_resources) | `6.4.5` | `6.5.2` | | [pre-commit](https://github.com/pre-commit/pre-commit) | `4.0.1` | `4.1.0` | | [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) | `0.25.0` | `0.25.3` | | [moto](https://github.com/getmoto/moto) | `5.0.25` | `5.1.0` | | [boto3](https://github.com/boto/boto3) | `1.35.90` | `1.37.4` | Updates `pydantic` from 2.10.4 to 2.10.6 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pydantic/pydantic/releases">pydantic's releases</a>.</em></p> <blockquote> <h2>v2.10.6 2025-01-23</h2> <h2>What's Changed</h2> <h3>Fixes</h3> <ul> <li>Fix JSON Schema reference collection with <code>'examples'</code> keys by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11325">#11325</a></li> <li>Fix url python serialization by <a href="https://github.com/sydney-runkle"><code>@sydney-runkle</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11331">#11331</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pydantic/pydantic/compare/v2.10.5...v2.10.6">https://github.com/pydantic/pydantic/compare/v2.10.5...v2.10.6</a></p> <h2>v2.10.5 2024-12-18</h2> <h2>What's Changed</h2> <h3>Fixes</h3> <ul> <li>Remove custom MRO implementation of Pydantic models by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11184">#11184</a></li> <li>Fix URL serialization for unions by <a href="https://github.com/sydney-runkle"><code>@sydney-runkle</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11233">#11233</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pydantic/pydantic/compare/v2.10.4...v2.10.5">https://github.com/pydantic/pydantic/compare/v2.10.4...v2.10.5</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pydantic/pydantic/blob/main/HISTORY.md">pydantic's changelog</a>.</em></p> <blockquote> <h2>v2.10.6 (2025-01-23)</h2> <p><a href="https://github.com/pydantic/pydantic/releases/tag/v2.10.6">GitHub release</a></p> <h3>What's Changed</h3> <h4>Fixes</h4> <ul> <li>Fix JSON Schema reference collection with <code>'examples'</code> keys by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11325">#11325</a></li> <li>Fix url python serialization by <a href="https://github.com/sydney-runkle"><code>@sydney-runkle</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11331">#11331</a></li> </ul> <h2>v2.10.5 (2025-01-08)</h2> <p><a href="https://github.com/pydantic/pydantic/releases/tag/v2.10.5">GitHub release</a></p> <h3>What's Changed</h3> <h4>Fixes</h4> <ul> <li>Remove custom MRO implementation of Pydantic models by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11184">#11184</a></li> <li>Fix URL serialization for unions by <a href="https://github.com/sydney-runkle"><code>@sydney-runkle</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/11233">#11233</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pydantic/pydantic/commit/df05e69a8a3fb37628a0e3a33518ca0425334bc9"><code>df05e69</code></a> Bump version to v2.10.6 (<a href="https://redirect.github.com/pydantic/pydantic/issues/11334">#11334</a>)</li> <li><a href="https://github.com/pydantic/pydantic/commit/416082625aed40ce341faf4b13e366f1ef51838d"><code>4160826</code></a> Fix url python serialization (<a href="https://redirect.github.com/pydantic/pydantic/issues/11331">#11331</a>)</li> <li><a href="https://github.com/pydantic/pydantic/commit/f94e842692969168ff8ea7ecefa6815fff2883d8"><code>f94e842</code></a> Fix JSON Schema reference collection with <code>"examples"</code> keys (<a href="https://redirect.github.com/pydantic/pydantic/issues/11325">#11325</a>)</li> <li><a href="https://github.com/pydantic/pydantic/commit/5d34efda82895b8697649e20616aea385d769eaf"><code>5d34efd</code></a> Prepare release v2.10.5 (<a href="https://redirect.github.com/pydantic/pydantic/issues/11237">#11237</a>)</li> <li><a href="https://github.com/pydantic/pydantic/commit/6e585f925e25f91f365ae6ad6c910a667f9d78e9"><code>6e585f9</code></a> Fix url serialization for unions (<a href="https://redirect.github.com/pydantic/pydantic/issues/11233">#11233</a>)</li> <li><a href="https://github.com/pydantic/pydantic/commit/5a22e026084044acbf6f24e0760d9903be0bfa5a"><code>5a22e02</code></a> Remove custom MRO implementation of Pydantic models (<a href="https://redirect.github.com/pydantic/pydantic/issues/11195">#11195</a>)</li> <li>See full diff in <a href="https://github.com/pydantic/pydantic/compare/v2.10.4...v2.10.6">compare view</a></li> </ul> </details> <br /> Updates `pypdf` from 5.1.0 to 5.3.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/py-pdf/pypdf/releases">pypdf's releases</a>.</em></p> <blockquote> <h2>Version 5.3.0, 2025-02-09</h2> <h2>What's new</h2> <h3>New Features (ENH)</h3> <ul> <li>Handle attachments in /Kids and provide object-oriented API (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3108">#3108</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Handle annotations being None on merging (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3111">#3111</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Prevent excessive layout mode text output from Type3 fonts (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3082">#3082</a>) by <a href="https://github.com/shartzog"><code>@shartzog</code></a></li> </ul> <h3>Documentation (DOC)</h3> <ul> <li>stefan6419846 becomes BDFL of pypdf (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3078">#3078</a>) by <a href="https://github.com/MartinThoma"><code>@MartinThoma</code></a></li> </ul> <h3>Developer Experience (DEV)</h3> <ul> <li>Remove ignoring multiple Ruff rules by <a href="https://github.com/j-t-1"><code>@j-t-1</code></a></li> <li>Remove unused mutmut configuration (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3092">#3092</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> </ul> <h3>Testing (TST)</h3> <ul> <li>Fix warning assertions to use <code>pytest.warns()</code> (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3083">#3083</a>) by <a href="https://github.com/mgorny"><code>@mgorny</code></a></li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.2.0...5.3.0">Full Changelog</a></p> <h2>Version 5.2.0, 2025-01-26</h2> <h2>What's new</h2> <h3>Deprecations (DEP)</h3> <ul> <li>Deprecate with replacement CCITParameters (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3019">#3019</a>) by <a href="https://github.com/j-t-1"><code>@j-t-1</code></a></li> <li>Correct deprecation of interiour_color (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2947">#2947</a>) by <a href="https://github.com/j-t-1"><code>@j-t-1</code></a></li> </ul> <h3>New Features (ENH)</h3> <ul> <li>Support alternative (U)F names for embedded file retrieval (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3072">#3072</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> <li>Adding support for reading .metadata.keywords (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2939">#2939</a>) by <a href="https://github.com/Lucas-C"><code>@Lucas-C</code></a></li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Handle further Tf operators in text extraction layout mode (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3073">#3073</a>) by <a href="https://github.com/blushingpenguin"><code>@blushingpenguin</code></a></li> <li>Ensure <code>add_metadata</code> can deal with <code>_info = None</code> (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3040">#3040</a>) by <a href="https://github.com/xmo-odoo"><code>@xmo-odoo</code></a></li> <li>Handle IndirectObject in CCITTFaxDecode filter (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2965">#2965</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> <li>Handle chained colorspace for inline images when no filter is set (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3008">#3008</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> <li>Avoid extracting inline images twice and dropping other operators (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3002">#3002</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> <li>Fixed reference of value with <code>str.__new__</code> in TextStringObject (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2952">#2952</a>) by <a href="https://github.com/thomas-forte"><code>@thomas-forte</code></a></li> <li>Handle indirect objects in font width calculations (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2967">#2967</a>) by <a href="https://github.com/nsw42"><code>@nsw42</code></a></li> <li>Title sometimes is bytes and not str (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2930">#2930</a>) by <a href="https://github.com/reformy"><code>@reformy</code></a></li> <li>Fix undefined variable for text extraction (regression) (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2934">#2934</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> <li>Don't close stream passed to PdfWriter.write() (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2909">#2909</a>) by <a href="https://github.com/alexaryn"><code>@alexaryn</code></a></li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Handle zero height fonts when extracting text (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3075">#3075</a>) by <a href="https://github.com/blushingpenguin"><code>@blushingpenguin</code></a></li> <li>Deal with content streams not containing streams (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3005">#3005</a>) by <a href="https://github.com/stefan6419846"><code>@stefan6419846</code></a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/py-pdf/pypdf/blob/main/CHANGELOG.md">pypdf's changelog</a>.</em></p> <blockquote> <h2>Version 5.3.0, 2025-02-09</h2> <h3>New Features (ENH)</h3> <ul> <li>Handle attachments in /Kids and provide object-oriented API (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3108">#3108</a>)</li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Handle annotations being None on merging (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3111">#3111</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Prevent excessive layout mode text output from Type3 fonts (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3082">#3082</a>)</li> </ul> <h3>Documentation (DOC)</h3> <ul> <li>stefan6419846 becomes BDFL of pypdf (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3078">#3078</a>)</li> <li>Tidy the visitor function description (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3086">#3086</a>)</li> </ul> <h3>Developer Experience (DEV)</h3> <ul> <li>Remove ignoring multiple Ruff rules</li> <li>Remove unused mutmut configuration (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3092">#3092</a>)</li> </ul> <h3>Testing (TST)</h3> <ul> <li>Fix warning assertions to use <code>pytest.warns()</code> (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3083">#3083</a>)</li> </ul> <p><a href="https://github.com/py-pdf/pypdf/compare/5.2.0...5.3.0">Full Changelog</a></p> <h2>Version 5.2.0, 2025-01-26</h2> <h3>Deprecations (DEP)</h3> <ul> <li>Deprecate with replacement CCITParameters (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3019">#3019</a>)</li> <li>Correct deprecation of interiour_color (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2947">#2947</a>)</li> </ul> <h3>New Features (ENH)</h3> <ul> <li>Support alternative (U)F names for embedded file retrieval (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3072">#3072</a>)</li> <li>Adding support for reading .metadata.keywords (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2939">#2939</a>)</li> </ul> <h3>Bug Fixes (BUG)</h3> <ul> <li>Handle further Tf operators in text extraction layout mode (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3073">#3073</a>)</li> <li>Ensure <code>add_metadata</code> can deal with <code>_info = None</code> (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3040">#3040</a>)</li> <li>Handle IndirectObject in CCITTFaxDecode filter (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2965">#2965</a>)</li> <li>Handle chained colorspace for inline images when no filter is set (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3008">#3008</a>)</li> <li>Avoid extracting inline images twice and dropping other operators (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3002">#3002</a>)</li> <li>Fixed reference of value with <code>str.__new__</code> in TextStringObject (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2952">#2952</a>)</li> <li>Handle indirect objects in font width calculations (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2967">#2967</a>)</li> <li>Title sometimes is bytes and not str (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2930">#2930</a>)</li> <li>Fix undefined variable for text extraction (regression) (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2934">#2934</a>)</li> <li>Don't close stream passed to PdfWriter.write() (<a href="https://redirect.github.com/py-pdf/pypdf/issues/2909">#2909</a>)</li> </ul> <h3>Robustness (ROB)</h3> <ul> <li>Handle zero height fonts when extracting text (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3075">#3075</a>)</li> <li>Deal with content streams not containing streams (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3005">#3005</a>)</li> <li>Gracefully handle some text operators when the operands are missing (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3006">#3006</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/py-pdf/pypdf/commit/1c3baab2640016bff4823a3efca6639613f71cfc"><code>1c3baab</code></a> REL: 5.3.0</li> <li><a href="https://github.com/py-pdf/pypdf/commit/6dfa2557dd05cbcea0bc9d09cade4c29845e843b"><code>6dfa255</code></a> DOC: stefan6419846 becomes BDFL of pypdf (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3078">#3078</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/dd106dc193b7fba4e8ee8345ed0f24ca68ad40f7"><code>dd106dc</code></a> ENH: Handle attachments in /Kids and provide object-oriented API (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3108">#3108</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/912b50cfd574919c1086f0337c060bd1267da134"><code>912b50c</code></a> BUG: Handle annotations being None on merging (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3111">#3111</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/5a50b577622a732378110a7a041c8d8501514fb8"><code>5a50b57</code></a> DEV: Remove ignore Ruff rule D407 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3105">#3105</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/5aaeabbca89efcb621c13295c6e2280bbaa30b50"><code>5aaeabb</code></a> DEV: Remove ignore Ruff rule D203 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3102">#3102</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/67e1781fde9ee4f8662a0e871fcced52d52bbd2d"><code>67e1781</code></a> DEV: Remove ignore Ruff rule ANN202 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3100">#3100</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/c78f68d90a9d26a8bf0d4bee45a089c055ea1c9b"><code>c78f68d</code></a> DEV: Remove ignore Ruff rule ANN204 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3099">#3099</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/c914a626d4fcfaae54d9ba0d3764dc8eb3c8a2f9"><code>c914a62</code></a> DEV: Remove ignoring Ruff rule PLW3301 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3093">#3093</a>)</li> <li><a href="https://github.com/py-pdf/pypdf/commit/510292184f0b2fecfea1bd21fa0ead6bd9c25c81"><code>5102921</code></a> DEV: Update to ruff 0.9.4 (<a href="https://redirect.github.com/py-pdf/pypdf/issues/3097">#3097</a>)</li> <li>Additional commits viewable in <a href="https://github.com/py-pdf/pypdf/compare/5.1.0...5.3.0">compare view</a></li> </ul> </details> <br /> Updates `black` from 24.10.0 to 25.1.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p> <blockquote> <h2>25.1.0</h2> <h3>Highlights</h3> <p>This release introduces the new 2025 stable style (<a href="https://redirect.github.com/psf/black/issues/4558">#4558</a>), stabilizing the following changes:</p> <ul> <li>Normalize casing of Unicode escape characters in strings to lowercase (<a href="https://redirect.github.com/psf/black/issues/2916">#2916</a>)</li> <li>Fix inconsistencies in whether certain strings are detected as docstrings (<a href="https://redirect.github.com/psf/black/issues/4095">#4095</a>)</li> <li>Consistently add trailing commas to typed function parameters (<a href="https://redirect.github.com/psf/black/issues/4164">#4164</a>)</li> <li>Remove redundant parentheses in if guards for case blocks (<a href="https://redirect.github.com/psf/black/issues/4214">#4214</a>)</li> <li>Add parentheses to if clauses in case blocks when the line is too long (<a href="https://redirect.github.com/psf/black/issues/4269">#4269</a>)</li> <li>Whitespace before <code># fmt: skip</code> comments is no longer normalized (<a href="https://redirect.github.com/psf/black/issues/4146">#4146</a>)</li> <li>Fix line length computation for certain expressions that involve the power operator (<a href="https://redirect.github.com/psf/black/issues/4154">#4154</a>)</li> <li>Check if there is a newline before the terminating quotes of a docstring (<a href="https://redirect.github.com/psf/black/issues/4185">#4185</a>)</li> <li>Fix type annotation spacing between <code>*</code> and more complex type variable tuple (<a href="https://redirect.github.com/psf/black/issues/4440">#4440</a>)</li> </ul> <p>The following changes were not in any previous release:</p> <ul> <li>Remove parentheses around sole list items (<a href="https://redirect.github.com/psf/black/issues/4312">#4312</a>)</li> <li>Generic function definitions are now formatted more elegantly: parameters are split over multiple lines first instead of type parameter definitions (<a href="https://redirect.github.com/psf/black/issues/4553">#4553</a>)</li> </ul> <h3>Stable style</h3> <ul> <li>Fix formatting cells in IPython notebooks with magic methods and starting or trailing empty lines (<a href="https://redirect.github.com/psf/black/issues/4484">#4484</a>)</li> <li>Fix crash when formatting <code>with</code> statements containing tuple generators/unpacking (<a href="https://redirect.github.com/psf/black/issues/4538">#4538</a>)</li> </ul> <h3>Preview style</h3> <ul> <li>Fix/remove string merging changing f-string quotes on f-strings with internal quotes (<a href="https://redirect.github.com/psf/black/issues/4498">#4498</a>)</li> <li>Collapse multiple empty lines after an import into one (<a href="https://redirect.github.com/psf/black/issues/4489">#4489</a>)</li> <li>Prevent <code>string_processing</code> and <code>wrap_long_dict_values_in_parens</code> from removing parentheses around long dictionary values (<a href="https://redirect.github.com/psf/black/issues/4377">#4377</a>)</li> <li>Move <code>wrap_long_dict_values_in_parens</code> from the unstable to preview style (<a href="https://redirect.github.com/psf/black/issues/4561">#4561</a>)</li> </ul> <h3>Packaging</h3> <ul> <li>Store license identifier inside the <code>License-Expression</code> metadata field, see <a href="https://peps.python.org/pep-0639/">PEP 639</a>. (<a href="https://redirect.github.com/psf/black/issues/4479">#4479</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Speed up the <code>is_fstring_start</code> function in Black's tokenizer (<a href="https://redirect.github.com/psf/black/issues/4541">#4541</a>)</li> </ul> <h3>Integrations</h3> <ul> <li>If using stdin with <code>--stdin-filename</code> set to a force excluded path, stdin won't be</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p> <blockquote> <h2>25.1.0</h2> <h3>Highlights</h3> <p>This release introduces the new 2025 stable style (<a href="https://redirect.github.com/psf/black/issues/4558">#4558</a>), stabilizing the following changes:</p> <ul> <li>Normalize casing of Unicode escape characters in strings to lowercase (<a href="https://redirect.github.com/psf/black/issues/2916">#2916</a>)</li> <li>Fix inconsistencies in whether certain strings are detected as docstrings (<a href="https://redirect.github.com/psf/black/issues/4095">#4095</a>)</li> <li>Consistently add trailing commas to typed function parameters (<a href="https://redirect.github.com/psf/black/issues/4164">#4164</a>)</li> <li>Remove redundant parentheses in if guards for case blocks (<a href="https://redirect.github.com/psf/black/issues/4214">#4214</a>)</li> <li>Add parentheses to if clauses in case blocks when the line is too long (<a href="https://redirect.github.com/psf/black/issues/4269">#4269</a>)</li> <li>Whitespace before <code># fmt: skip</code> comments is no longer normalized (<a href="https://redirect.github.com/psf/black/issues/4146">#4146</a>)</li> <li>Fix line length computation for certain expressions that involve the power operator (<a href="https://redirect.github.com/psf/black/issues/4154">#4154</a>)</li> <li>Check if there is a newline before the terminating quotes of a docstring (<a href="https://redirect.github.com/psf/black/issues/4185">#4185</a>)</li> <li>Fix type annotation spacing between <code>*</code> and more complex type variable tuple (<a href="https://redirect.github.com/psf/black/issues/4440">#4440</a>)</li> </ul> <p>The following changes were not in any previous release:</p> <ul> <li>Remove parentheses around sole list items (<a href="https://redirect.github.com/psf/black/issues/4312">#4312</a>)</li> <li>Generic function definitions are now formatted more elegantly: parameters are split over multiple lines first instead of type parameter definitions (<a href="https://redirect.github.com/psf/black/issues/4553">#4553</a>)</li> </ul> <h3>Stable style</h3> <ul> <li>Fix formatting cells in IPython notebooks with magic methods and starting or trailing empty lines (<a href="https://redirect.github.com/psf/black/issues/4484">#4484</a>)</li> <li>Fix crash when formatting <code>with</code> statements containing tuple generators/unpacking (<a href="https://redirect.github.com/psf/black/issues/4538">#4538</a>)</li> </ul> <h3>Preview style</h3> <ul> <li>Fix/remove string merging changing f-string quotes on f-strings with internal quotes (<a href="https://redirect.github.com/psf/black/issues/4498">#4498</a>)</li> <li>Collapse multiple empty lines after an import into one (<a href="https://redirect.github.com/psf/black/issues/4489">#4489</a>)</li> <li>Prevent <code>string_processing</code> and <code>wrap_long_dict_values_in_parens</code> from removing parentheses around long dictionary values (<a href="https://redirect.github.com/psf/black/issues/4377">#4377</a>)</li> <li>Move <code>wrap_long_dict_values_in_parens</code> from the unstable to preview style (<a href="https://redirect.github.com/psf/black/issues/4561">#4561</a>)</li> </ul> <h3>Packaging</h3> <ul> <li>Store license identifier inside the <code>License-Expression</code> metadata field, see <a href="https://peps.python.org/pep-0639/">PEP 639</a>. (<a href="https://redirect.github.com/psf/black/issues/4479">#4479</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Speed up the <code>is_fstring_start</code> function in Black's tokenizer (<a href="https://redirect.github.com/psf/black/issues/4541">#4541</a>)</li> </ul> <h3>Integrations</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/psf/black/commit/8a737e727ac5ab2f1d4cf5876720ed276dc8dc4b"><code>8a737e7</code></a> Prepare release 25.1.0 (<a href="https://redirect.github.com/psf/black/issues/4563">#4563</a>)</li> <li><a href="https://github.com/psf/black/commit/d330deea00e199b99dea59fb4643305408c19a9b"><code>d330dee</code></a> docs: We're not going to use backslashes for the with statement (<a href="https://redirect.github.com/psf/black/issues/4564">#4564</a>)</li> <li><a href="https://github.com/psf/black/commit/3d8129001f13e8c1a50eb73d8f44d26ad48f9c8c"><code>3d81290</code></a> Move <code>wrap_long_dict_values_in_parens</code> to the preview style (<a href="https://redirect.github.com/psf/black/issues/4561">#4561</a>)</li> <li><a href="https://github.com/psf/black/commit/459562c71a725a0a58a7cb710bd4b68417df4496"><code>459562c</code></a> Improve function declaration wrapping when it contains generic type definitio...</li> <li><a href="https://github.com/psf/black/commit/99dbf3006b30dd77a0f650b25d9b1c8071f25e1e"><code>99dbf30</code></a> Cache executor to avoid hitting open file limits (<a href="https://redirect.github.com/psf/black/issues/4560">#4560</a>)</li> <li><a href="https://github.com/psf/black/commit/c0b92f3888a004b95e4626d8007a4b259b8f444f"><code>c0b92f3</code></a> Prepare the 2025 stable style (<a href="https://redirect.github.com/psf/black/issues/4558">#4558</a>)</li> <li><a href="https://github.com/psf/black/commit/e58baf15b99e0202f10bda09447d3eb246e88df9"><code>e58baf1</code></a> Add test for <a href="https://redirect.github.com/psf/black/issues/1187">#1187</a> (<a href="https://redirect.github.com/psf/black/issues/4559">#4559</a>)</li> <li><a href="https://github.com/psf/black/commit/1455ae47311facfaf3ad62d2c223d86ae95c5c68"><code>1455ae4</code></a> Fix docs CI (<a href="https://redirect.github.com/psf/black/issues/4555">#4555</a>)</li> <li><a href="https://github.com/psf/black/commit/584d0331c8a73785af8a78fa601c540f5fe7bea2"><code>584d033</code></a> fix: Don't remove parenthesis around long dictionary values (<a href="https://redirect.github.com/psf/black/issues/4377">#4377</a>)</li> <li><a href="https://github.com/psf/black/commit/6e9654065ca5e4b7c7a9491431a6cd7bc4016da3"><code>6e96540</code></a> Fix CI (<a href="https://redirect.github.com/psf/black/issues/4551">#4551</a>)</li> <li>Additional commits viewable in <a href="https://github.com/psf/black/compare/24.10.0...25.1.0">compare view</a></li> </ul> </details> <br /> Updates `flake8` from 7.1.1 to 7.1.2 <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/PyCQA/flake8/commit/fffee8ba9dc5903484f99390e6c7f4bbef59bda7"><code>fffee8b</code></a> Release 7.1.2</li> <li><a href="https://github.com/PyCQA/flake8/commit/19001f77f3a8edccfd2d4c71e3c0fd7ed7fcb329"><code>19001f7</code></a> Merge pull request <a href="https://redirect.github.com/pycqa/flake8/issues/1966">#1966</a> from PyCQA/limit-procs-to-file-count</li> <li><a href="https://github.com/PyCQA/flake8/commit/f35737a32d8283fd0d3456bd9919718ff2d1b077"><code>f35737a</code></a> avoid starting unnecessary processes when file count is limited</li> <li>See full diff in <a href="https://github.com/pycqa/flake8/compare/7.1.1...7.1.2">compare view</a></li> </ul> </details> <br /> Updates `importlib-resources` from 6.4.5 to 6.5.2 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python/importlib_resources/blob/main/NEWS.rst">importlib-resources's changelog</a>.</em></p> <blockquote> <h1>v6.5.2</h1> <h2>Bugfixes</h2> <ul> <li>Replaced reference to typing_extensions with stdlib Literal. (<a href="https://redirect.github.com/python/importlib_resources/issues/323">#323</a>)</li> </ul> <h1>v6.5.1</h1> <h2>Bugfixes</h2> <ul> <li>Updated <code>Traversable.read_text()</code> to reflect the <code>errors</code><code>python/cpython#127012</code><a href="https://redirect.github.com/python/importlib_resources/issues/321">#321</a>)</li> </ul> <h1>v6.5.0</h1> <h2>Features</h2> <ul> <li>Add type annotations for Traversable.open. (<a href="https://redirect.github.com/python/importlib_resources/issues/317">#317</a>)</li> <li>Require Python 3.9 or later.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python/importlib_resources/commit/7d3b2bfa1d8c53ecb64246ba16d8c632f8fcb6bf"><code>7d3b2bf</code></a> Finalize</li> <li><a href="https://github.com/python/importlib_resources/commit/14408098293bd6bc68eca7b5a53333729a567e57"><code>1440809</code></a> Merge pull request <a href="https://redirect.github.com/python/importlib_resources/issues/324">#324</a> from pstjohn/patch-1</li> <li><a href="https://github.com/python/importlib_resources/commit/6569354ad2cf38b202fdeaf11b49e639b1a00fbc"><code>6569354</code></a> Add news fragment.</li> <li><a href="https://github.com/python/importlib_resources/commit/6c1bc3cdb8f8a7d29252becc201508712040facc"><code>6c1bc3c</code></a> Rely on Literal from stdlib.</li> <li><a href="https://github.com/python/importlib_resources/commit/883380a5fcc482b67014b90b9aa7250d868c795a"><code>883380a</code></a> Update pyproject.toml</li> <li><a href="https://github.com/python/importlib_resources/commit/a61a948b6293ed46972909652909e2540242f197"><code>a61a948</code></a> Add typing-extensions as a dependency</li> <li><a href="https://github.com/python/importlib_resources/commit/78c4bda73c5d671cbbcfdf1430b6f2da03aeb04f"><code>78c4bda</code></a> Finalize</li> <li><a href="https://github.com/python/importlib_resources/commit/10d87bf85a404e9fb9271f8f353ad0452c0cc631"><code>10d87bf</code></a> Merge pull request <a href="https://redirect.github.com/python/importlib_resources/issues/321">#321</a> from kurtmckee/add-readtext-errors-parameter-cpython-...</li> <li><a href="https://github.com/python/importlib_resources/commit/9a872e5dbceff32260e8ff19d039236304ee150c"><code>9a872e5</code></a> Add news fragment.</li> <li><a href="https://github.com/python/importlib_resources/commit/cf269ce50f496671f3b7fbc5e6292946ecc70e7d"><code>cf269ce</code></a> Replace unreachable block with simple assertion. Fixes diffcov failure.</li> <li>Additional commits viewable in <a href="https://github.com/python/importlib_resources/compare/v6.4.5...v6.5.2">compare view</a></li> </ul> </details> <br /> Updates `pre-commit` from 4.0.1 to 4.1.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pre-commit/pre-commit/releases">pre-commit's releases</a>.</em></p> <blockquote> <h2>pre-commit v4.1.0</h2> <h3>Features</h3> <ul> <li>Add <code>language: julia</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3348">#3348</a> PR by <a href="https://github.com/fredrikekre"><code>@fredrikekre</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/2689">#2689</a> issue <a href="https://github.com/jmuchovej"><code>@jmuchovej</code></a>.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li>Disable automatic toolchain switching for <code>language: golang</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3304">#3304</a> PR by <a href="https://github.com/AleksaC"><code>@AleksaC</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3300">#3300</a> issue by <a href="https://github.com/AleksaC"><code>@AleksaC</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3149">#3149</a> issue by <a href="https://github.com/nijel"><code>@nijel</code></a>.</li> </ul> </li> <li>Fix <code>language: r</code> installation when initiated by RStudio. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3389">#3389</a> PR by <a href="https://github.com/lorenzwalthert"><code>@lorenzwalthert</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3385">#3385</a> issue by <a href="https://github.com/lorenzwalthert"><code>@lorenzwalthert</code></a>.</li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md">pre-commit's changelog</a>.</em></p> <blockquote> <h1>4.1.0 - 2025-01-20</h1> <h3>Features</h3> <ul> <li>Add <code>language: julia</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3348">#3348</a> PR by <a href="https://github.com/fredrikekre"><code>@fredrikekre</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/2689">#2689</a> issue <a href="https://github.com/jmuchovej"><code>@jmuchovej</code></a>.</li> </ul> </li> </ul> <h3>Fixes</h3> <ul> <li>Disable automatic toolchain switching for <code>language: golang</code>. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3304">#3304</a> PR by <a href="https://github.com/AleksaC"><code>@AleksaC</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3300">#3300</a> issue by <a href="https://github.com/AleksaC"><code>@AleksaC</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3149">#3149</a> issue by <a href="https://github.com/nijel"><code>@nijel</code></a>.</li> </ul> </li> <li>Fix <code>language: r</code> installation when initiated by RStudio. <ul> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3389">#3389</a> PR by <a href="https://github.com/lorenzwalthert"><code>@lorenzwalthert</code></a>.</li> <li><a href="https://redirect.github.com/pre-commit/pre-commit/issues/3385">#3385</a> issue by <a href="https://github.com/lorenzwalthert"><code>@lorenzwalthert</code></a>.</li> </ul> </li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pre-commit/pre-commit/commit/b152e922ef11a97efe22ca7dc4f90011f0d1711c"><code>b152e92</code></a> v4.1.0</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/c3125a4d36912c768bfa5dcb2b79d6f4179d79ed"><code>c3125a4</code></a> Merge pull request <a href="https://redirect.github.com/pre-commit/pre-commit/issues/3389">#3389</a> from lorenzwalthert/dev-always-unset-renv</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/c2c061cf63e00a3ff8c88a9054c47e96a36f2daa"><code>c2c061c</code></a> fix: ensure env patch is applied for vanilla emulation</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/cd429db5e2172e51099716efd58a15e76a1719a7"><code>cd429db</code></a> Merge pull request <a href="https://redirect.github.com/pre-commit/pre-commit/issues/3382">#3382</a> from pre-commit/pre-commit-ci-update-config</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/9b9f8e254d46da65c8544244c423596d54260e24"><code>9b9f8e2</code></a> [pre-commit.ci] pre-commit autoupdate</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/86300a4a7e5441aad007d83c1101d8a8eb767ad7"><code>86300a4</code></a> Merge pull request <a href="https://redirect.github.com/pre-commit/pre-commit/issues/3376">#3376</a> from pre-commit/r-gone</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/77edad8455e88b403e055d2692c9545085cf3edb"><code>77edad8</code></a> install r on ubuntu runners</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/18b393905e24c730eeb15754f6f275a9d27e396f"><code>18b3939</code></a> Merge pull request <a href="https://redirect.github.com/pre-commit/pre-commit/issues/3375">#3375</a> from pre-commit/dotnet-tests-ubuntu-latest</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/31cb945ffb860f6f8176642d1a27af40eeec554d"><code>31cb945</code></a> Merge pull request <a href="https://redirect.github.com/pre-commit/pre-commit/issues/3374">#3374</a> from pre-commit/docker-image-tests-ubuntu-22-not-pre...</li> <li><a href="https://github.com/pre-commit/pre-commit/commit/28c3d81bd27fe5e62eead459c1963a582e763bd7"><code>28c3d81</code></a> update .net tests to use .net 8</li> <li>Additional commits viewable in <a href="https://github.com/pre-commit/pre-commit/compare/v4.0.1...v4.1.0">compare view</a></li> </ul> </details> <br /> Updates `pytest-asyncio` from 0.25.0 to 0.25.3 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's releases</a>.</em></p> <blockquote> <h2>pytest-asyncio 0.25.3</h2> <ul> <li>Avoid errors in cleanup of async generators when event loop is already closed <a href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1040">#1040</a></li> </ul> <h2>pytest-asyncio 0.25.2</h2> <ul> <li>Call <code>loop.shutdown_asyncgens()</code> before closing the event loop to ensure async generators are closed in the same manner as <code>asyncio.run</code> does <a href="https://redirect.github.com/pytest-dev/pytest-asyncio/pull/1034">#1034</a></li> </ul> <h2>pytest-asyncio 0.25.1</h2> <ul> <li>Fixes an issue that caused a broken event loop when a function-scoped test was executed in between two tests with wider loop scope <a href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/950">#950</a></li> <li>Improves test collection speed in auto mode <a href="https://redirect.github.com/pytest-dev/pytest-asyncio/pull/1020">#1020</a></li> <li>Corrects the warning that is emitted upon redefining the event_loop fixture</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/7c501923b00b4aeeb68d4b3b11065f0c3b5cba2c"><code>7c50192</code></a> fix: Avoid errors in cleanup of async generators when event loop is already c...</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/2188cdbbf7b47e653957d3f39aeb7d4d0de80bf4"><code>2188cdb</code></a> build: Prepare release of v0.25.2.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/c3ad6340b8ad251f3c03d6bbe399f08434059bda"><code>c3ad634</code></a> fix: Shutdown generators before closing event loops.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/e8ffb10528aaf578dc9ccc7ddbb1fadab56be8ac"><code>e8ffb10</code></a> [pre-commit.ci] pre-commit autoupdate</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/aae43d4f766dfd8f9a643faad41be411888a5d16"><code>aae43d4</code></a> Build(deps): Bump hypothesis in /dependencies/default</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/941e8b5104d86bb1b06b15fd3395f23120203c09"><code>941e8b5</code></a> Build(deps): Bump pygments from 2.18.0 to 2.19.1 in /dependencies/docs</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/623ab74b80b6f748e88254714f9b21a16eb7911e"><code>623ab74</code></a> docs: Prepare release of v0.25.1.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/c236550e739b55ee62f3e6ec7f71b4f4231236d1"><code>c236550</code></a> docs: Fix broken link to the pytest.mark.asyncio reference.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/41c645b3b79709c2812a3aa3b17943074bc33f48"><code>41c645b</code></a> fix: Correct warning message when redefining the event_loop fixture.</li> <li><a href="https://github.com/pytest-dev/pytest-asyncio/commit/2fd10f824302d45da752341c60c8ddec48297a1b"><code>2fd10f8</code></a> docs: Clarify deprecation of event_loop fixture.</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.25.0...v0.25.3">compare view</a></li> </ul> </details> <br /> Updates `moto` from 5.0.25 to 5.1.0 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/getmoto/moto/blob/master/CHANGELOG.md">moto's changelog</a>.</em></p> <blockquote> <h2>5.1.0</h2> <p>Docker Digest for 5.1.0: <em>sha256:aaf5f4a72412b753b2115417e26360612564d3a29b1831f9316708e15138d699</em></p> <pre><code>* General: * Dropped support for Python 3.8 <ul> <li> <p>New Services:</p> <ul> <li> <p>Lex V2 Models:</p> <ul> <li>create_bot()</li> <li>create_bot_alias()</li> <li>create_resource_policy()</li> <li>delete_bot()</li> <li>delete_bot_alias()</li> <li>delete_resource_policy()</li> <li>describe_bot()</li> <li>describe_bot_alias()</li> <li>describe_resource_policy()</li> <li>list_bots()</li> <li>list_bot_aliases()</li> <li>list_tags_for_resource()</li> <li>tag_resource()</li> <li>update_bot()</li> <li>update_bot_alias()</li> <li>update_resource_policy()</li> <li>untag_resource()</li> </ul> </li> <li> <p>CloudHSM V2:</p> <ul> <li>create_cluster()</li> <li>delete_cluster()</li> <li>describe_backups()</li> <li>describe_clusters()</li> <li>get_resource_policy()</li> <li>list_tags()</li> <li>put_resource_policy()</li> <li>tag_resource()</li> <li>untag_resource()</li> </ul> </li> </ul> </li> <li> <p>New Methods:</p> <ul> <li> <p>ElasticSearch:</p> <ul> <li>add_tags()</li> <li>list_tags()</li> <li>remove_tags()</li> </ul> </li> <li> <p>RDS:</p> <ul> <li>describe_events()</li> <li>describe_db_log_files()</li> <li>failover_db_cluster()</li> <li>restore_db_cluster_to_point_in_time()<br /> </code></pre></li> </ul> </li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/getmoto/moto/commit/3c5e056c2b9c0954cba3719a341be33808c46300"><code>3c5e056</code></a> Pre-Release: Up Version Number</li> <li><a href="https://github.com/getmoto/moto/commit/150778f11e3a35a8f3c0104220968875d1a3030a"><code>150778f</code></a> Prep release 5.1.0 (<a href="https://redirect.github.com/getmoto/moto/issues/8618">#8618</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/4acaf84f95e6cfc40784d575fbdcdcda801cab02"><code>4acaf84</code></a> Admin: Drop support for Python 3.8 (<a href="https://redirect.github.com/getmoto/moto/issues/8617">#8617</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/2b282d9c6a25bef683920f86493188254e2725fa"><code>2b282d9</code></a> Admin: Add CPP tests (<a href="https://redirect.github.com/getmoto/moto/issues/8613">#8613</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/b22cbf133e28cd3aee2a0e4674a2e0b730c79589"><code>b22cbf1</code></a> chore: update EC2 Instance Offerings (<a href="https://redirect.github.com/getmoto/moto/issues/8614">#8614</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/12a03d72a5eb11c153fcc26bed4648670c271a91"><code>12a03d7</code></a> chore: update EC2 Instance Types (<a href="https://redirect.github.com/getmoto/moto/issues/8615">#8615</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/23fdc96711867b85cd0ad545301bcb4513cc168a"><code>23fdc96</code></a> chore: update SSM default parameters (<a href="https://redirect.github.com/getmoto/moto/issues/8616">#8616</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/c2d61ae6d6e5bfac7b51c8e86059f67e28cb5b0a"><code>c2d61ae</code></a> CloudHSMv2 Integration (<a href="https://redirect.github.com/getmoto/moto/issues/8532">#8532</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/e1ddea8a0257bd069c2c1e564327d8543e4eaed5"><code>e1ddea8</code></a> Logs: Add new methods (<a href="https://redirect.github.com/getmoto/moto/issues/8608">#8608</a>)</li> <li><a href="https://github.com/getmoto/moto/commit/d00aa025b6c3d37977508b5d5e81ecad4ca15159"><code>d00aa02</code></a> Lex v2 Models Support (<a href="https://redirect.github.com/getmoto/moto/issues/8533">#8533</a>)</li> <li>Additional commits viewable in <a href="https://github.com/getmoto/moto/compare/5.0.25...5.1.0">compare view</a></li> </ul> </details> <br /> Updates `boto3` from 1.35.90 to 1.37.4 <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/boto/boto3/commit/0c61b96dcce64926771a4d813a598920a45adb2e"><code>0c61b96</code></a> Merge branch 'release-1.37.4'</li> <li><a href="https://github.com/boto/boto3/commit/b474be942163ecf9f19a892fdd8c528514dedae7"><code>b474be9</code></a> Bumping version to 1.37.4</li> <li><a href="https://github.com/boto/boto3/commit/de332a93cfca4e53498f76ad3d41bea4a6e39373"><code>de332a9</code></a> Add changelog entries from botocore</li> <li><a href="https://github.com/boto/boto3/commit/b0cfdee9101746bdfe8f869435e342cf7384a21e"><code>b0cfdee</code></a> Merge branch 'release-1.37.3'</li> <li><a href="https://github.com/boto/boto3/commit/63a9bb24f0f1cd4ca26d9325842d7584e55e0808"><code>63a9bb2</code></a> Merge branch 'release-1.37.3' into develop</li> <li><a href="https://github.com/boto/boto3/commit/fd969689c4030e3b9c975cf04b74913b96c82937"><code>fd96968</code></a> Bumping version to 1.37.3</li> <li><a href="https://github.com/boto/boto3/commit/8c09caa202525bf5e01bbe023a45823fdcfcbac8"><code>8c09caa</code></a> Add changelog entries from botocore</li> <li><a href="https://github.com/boto/boto3/commit/474cfa0c7e1f3703dbb32a08d34d17b3778e793b"><code>474cfa0</code></a> Merge branch 'release-1.37.2'</li> <li><a href="https://github.com/boto/boto3/commit/424551284469ad12b0c20d14d4fa2b780b3e3771"><code>4245512</code></a> Merge branch 'release-1.37.2' into develop</li> <li><a href="https://github.com/boto/boto3/commit/d10ead85a76dab37a0307bbeda14e208180b755c"><code>d10ead8</code></a> Bumping version to 1.37.2</li> <li>Additional commits viewable in <a href="https://github.com/boto/boto3/compare/1.35.90...1.37.4">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bug report
Bug description:
I'm writing a custom importer and discovered that the function signature for
importlib.abc.Traversable.read_text()
is incompatible with the usage inimportlib.resources._functional.read_text()
, specifically on Python 3.13.importlib.abc.Traversable.read_text()
is a concrete method; its implementation calls the.open()
method, which is an abstract method that must be implemented. The expectation is therefore that implementing.open()
in a Traversable subclass is sufficient for.read_text()
to work.Note below that the
.read_text()
method is not marked as abstract, and includes only one parameter:encoding
:cpython/Lib/importlib/resources/abc.py
Lines 84 to 90 in 30aeb00
Application code that attempts to read a package resource, like
importlib.resources.read_text(module, "resource.txt")
ultimately leads to a call toimportlib.resources._functional.read_text()
, which attempts to call the.read_text()
method of a Traversable subclass, but includes anerrors
parameter that doesn't exist in Traversable's default concrete method:cpython/Lib/importlib/resources/_functional.py
Lines 28 to 32 in 30aeb00
Consequently, it appears to be necessary for all Traversable subclasses to not only re-implement its concrete
.read_text()
method, but also to override its signature.I think that the Traversable
.read_text()
method signature, and the call site inimportlib.resources._functional.read_text()
, need to align with each other.I'd like to submit a PR for this! However, I would like confirmation that an
errors
parameter should be added to theTraversable.read_text()
method.Note that adding an
errors
parameter was previously discussed in #88368.Demonstration of TypeError bug
CPython versions tested on:
3.13
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: