Fix unwanted crashes caused by AST equivalency check (#4290)
Preview style
if guards in case blocks are now wrapped in parentheses when the line is too long.
(#4269)
Stop moving multiline strings to a new line unless inside brackets (#4289)
Integrations
Add a new option use_pyproject to the GitHub Action psf/black. This will read the
Black version from pyproject.toml. (#4294)
24.3.0
Highlights
This release is a milestone: it fixes Black's first CVE security vulnerability. If you
run Black on untrusted input, or if you habitually put thousands of leading tab
characters in your docstrings, you are strongly encouraged to upgrade immediately to fix
CVE-2024-21503.
This release also fixes a bug in Black's AST safety check that allowed Black to make
incorrect changes to certain f-strings that are valid in Python 3.12 and higher.
Stable style
Don't move comments along with delimiters, which could cause crashes (#4248)
Strengthen AST safety check to catch more unsafe changes to strings. Previous versions
of Black would incorrectly format the contents of certain unusual f-strings containing
nested strings with the same quote type. Now, Black will crash on such strings until
support for the new f-string syntax is implemented. (#4270)
Fix a bug where line-ranges exceeding the last code line would not work as expected
(#4273)
Performance
Fix catastrophic performance on docstrings that contain large numbers of leading tab
characters. This fixes
CVE-2024-21503.
(#4278)
Documentation
Note what happens when --check is used with --quiet (#4236)
Fix unwanted crashes caused by AST equivalency check (#4290)
Preview style
if guards in case blocks are now wrapped in parentheses when the line is too long.
(#4269)
Stop moving multiline strings to a new line unless inside brackets (#4289)
Integrations
Add a new option use_pyproject to the GitHub Action psf/black. This will read the
Black version from pyproject.toml. (#4294)
24.3.0
Highlights
This release is a milestone: it fixes Black's first CVE security vulnerability. If you
run Black on untrusted input, or if you habitually put thousands of leading tab
characters in your docstrings, you are strongly encouraged to upgrade immediately to fix
CVE-2024-21503.
This release also fixes a bug in Black's AST safety check that allowed Black to make
incorrect changes to certain f-strings that are valid in Python 3.12 and higher.
Stable style
Don't move comments along with delimiters, which could cause crashes (#4248)
Strengthen AST safety check to catch more unsafe changes to strings. Previous versions
of Black would incorrectly format the contents of certain unusual f-strings containing
nested strings with the same quote type. Now, Black will crash on such strings until
support for the new f-string syntax is implemented. (#4270)
Fix a bug where line-ranges exceeding the last code line would not work as expected
(#4273)
Performance
Fix catastrophic performance on docstrings that contain large numbers of leading tab
characters. This fixes
CVE-2024-21503.
(#4278)
Documentation
Note what happens when --check is used with --quiet (#4236)
* Do specifier matching correctly when the specifier contains an epoch number
and has more components than the version (:issue:`683`)
* Support the experimental ``--disable-gil`` builds in packaging.tags
(:issue:`727`)
* BREAKING: Make optional ``metadata.Metadata`` attributes default to ``None`` (:issue:`733`)
* Fix errors when trying to access the ``description_content_type``, ``keywords``,
and ``requires_python`` attributes on ``metadata.Metadata`` when those values
have not been provided (:issue:`733`)
* Fix a bug preventing the use of the built in ``ExceptionGroup`` on versions of
Python that support it (:issue:`725`)
Added support for previously missing RELATIVE-OID construct
[pr #48](pyasn1/pyasn1#48)
Updated link to Layman's Guide
Now it provides a link to links to a formatted PDF version of the paper,
at a stable domain (researchgate), using https
[pr #50](pyasn1/pyasn1#50)
This feature release provides improvements to various recently
added features, most importantly type parameter defaults (PEP 696).
There are no changes since 4.11.0rc1.
Changes since 4.10.0:
Fix tests on Python 3.13.0a5. Patch by Jelle Zijlstra.
Fix the runtime behavior of type parameters with defaults (PEP 696).
Patch by Nadir Chowdhury.
Fix minor discrepancy between error messages produced by typing
and typing_extensions on Python 3.10. Patch by Jelle Zijlstra.
When include_extra=False, get_type_hints() now strips ReadOnly from the annotation.
4.11.0rc1
Fix tests on Python 3.13.0a5. Patch by Jelle Zijlstra.
Fix the runtime behavior of type parameters with defaults (PEP 696).
Patch by Nadir Chowdhury.
Fix minor discrepancy between error messages produced by typing
and typing_extensions on Python 3.10. Patch by Jelle Zijlstra.
When include_extra=False, get_type_hints() now strips ReadOnly from the annotation.
4.10.0
Release 4.10.0 (February 25, 2024)
This feature release adds support for PEP 728 (TypedDict with extra
items) and PEP 742 (TypeIs).
There are no changes since 4.10.0rc1.
4.10.0rc1
Release 4.10.0rc1 (February 17, 2024)
Add support for PEP 728, supporting the closed keyword argument and the
special __extra_items__ key for TypedDict. Patch by Zixuan James Li.
Add support for PEP 742, adding typing_extensions.TypeIs. Patch
by Jelle Zijlstra.
Drop runtime error when a read-only TypedDict item overrides a mutable
one. Type checkers should still flag this as an error. Patch by Jelle
Zijlstra.
Speedup issubclass() checks against simple runtime-checkable protocols by
around 6% (backporting python/cpython#112717, by Alex
Waygood).
Fix a regression in the implementation of protocols where typing.Protocol
classes that were not marked as @runtime_checkable would be unnecessarily
introspected, potentially causing exceptions to be raised if the protocol had
problematic members. Patch by Alex Waygood, backporting
This feature release provides improvements to various recently
added features, most importantly type parameter defaults (PEP 696).
There are no changes since 4.11.0rc1.
Release 4.11.0rc1 (March 24, 2024)
Fix tests on Python 3.13.0a5. Patch by Jelle Zijlstra.
Fix the runtime behavior of type parameters with defaults (PEP 696).
Patch by Nadir Chowdhury.
Fix minor discrepancy between error messages produced by typing
and typing_extensions on Python 3.10. Patch by Jelle Zijlstra.
When include_extra=False, get_type_hints() now strips ReadOnly from the annotation.
Release 4.10.0 (February 24, 2024)
This feature release adds support for PEP 728 (TypedDict with extra
items) and PEP 742 (TypeIs).
There are no changes since 4.10.0rc1.
Release 4.10.0rc1 (February 17, 2024)
Add support for PEP 728, supporting the closed keyword argument and the
special __extra_items__ key for TypedDict. Patch by Zixuan James Li.
Add support for PEP 742, adding typing_extensions.TypeIs. Patch
by Jelle Zijlstra.
Drop runtime error when a read-only TypedDict item overrides a mutable
one. Type checkers should still flag this as an error. Patch by Jelle
Zijlstra.
Speedup issubclass() checks against simple runtime-checkable protocols by
around 6% (backporting python/cpython#112717, by Alex
Waygood).
Fix a regression in the implementation of protocols where typing.Protocol
classes that were not marked as @runtime_checkable would be unnecessarily
introspected, potentially causing exceptions to be raised if the protocol had
problematic members. Patch by Alex Waygood, backporting
python/cpython#113401.
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Changes
Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. (#3331)
Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. (#3343)
Changed ProtocolError to InvalidChunkLength when response terminates before the chunk length is sent. (#2860)
Changed ProtocolError to be more verbose on incomplete reads with excess content. (#3261)
Fixed issue where InsecureRequestWarning was emitted for HTTPS connections when using Emscripten. ([#3331](https://github.com/urllib3/urllib3/issues/3331) <https://github.com/urllib3/urllib3/issues/3331>__)
Fixed HTTPConnectionPool.urlopen to stop automatically casting non-proxy headers to HTTPHeaderDict. This change was premature as it did not apply to proxy headers and HTTPHeaderDict does not handle byte header values correctly yet. ([#3343](https://github.com/urllib3/urllib3/issues/3343) <https://github.com/urllib3/urllib3/issues/3343>__)
Changed InvalidChunkLength to ProtocolError when response terminates before the chunk length is sent. ([#2860](https://github.com/urllib3/urllib3/issues/2860) <https://github.com/urllib3/urllib3/issues/2860>__)
Changed ProtocolError to be more verbose on incomplete reads with excess content. ([#3261](https://github.com/urllib3/urllib3/issues/3261) <https://github.com/urllib3/urllib3/issues/3261>__)
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 commands and options
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 ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore 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 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 ` 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 ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dependencies group with 8 updates:
23.12.1
24.4.0
3.6
3.7
23.2
24.0
4.1.0
4.2.0
0.5.1
0.6.0
2.21
2.22
4.9.0
4.11.0
2.2.0
2.2.1
Updates
black
from 23.12.1 to 24.4.0Release notes
Sourced from black's releases.
... (truncated)
Changelog
Sourced from black's changelog.
... (truncated)
Commits
8fe6270
Prepare release 24.4.0 (#4307)6b25e7c
Bump peter-evans/find-comment from 3.0.0 to 3.1.0 (#4304)07fe1ca
docs: remove repetitive word (#4303)3383f53
GitHub Action: Allow reading version from pyproject.toml (#4294)c8f1a55
[pre-commit.ci] pre-commit autoupdate (#4297)836acad
Improve AST safety check (#4290)13bd092
fix: Stop moving multiline strings to a new line unless inside brackets (#4289)c9d2635
Remove mocking from tests (#4287)bf11956
Fix two logging calls in the test helper (#4286)97993f9
Bump pypa/cibuildwheel from 2.16.5 to 2.17.0 (#4283)Updates
idna
from 3.6 to 3.7Release notes
Sourced from idna's releases.
Changelog
Sourced from idna's changelog.
Commits
1d365e1
Release v3.7c1b3154
Merge pull request #172 from kjd/optimize-contextj0394ec7
Merge branch 'master' into optimize-contextjcd58a23
Merge pull request #152 from elliotwutingfeng/dev5beb28b
More efficient resolution of joiner contexts1b12148
Update ossf/scorecard-action to v2.3.1d516b87
Update Github actions/checkout to v4c095c75
Merge branch 'master' into dev60a0a4c
Fix typo in GitHub Actions workflow key5918a0e
Merge branch 'master' into devUpdates
packaging
from 23.2 to 24.0Release notes
Sourced from packaging's releases.
Changelog
Sourced from packaging's changelog.
Commits
7a983f7
Bump for release4d85340
Add riscv64 as a supported manylinux architecture (#751)4dce761
Apply some ruff suggestions (#772)57a6a7f
Appply some bugbear suggestions (#761)7bcd6d8
Apply some refurb suggestions (#763)d0067e9
[StepSecurity] ci: Harden GitHub Actions (#1) (#758)eae70dd
feat: Create dependabot.yml (#757)241bb35
Update URLs (#764)7698237
Remove coverage ignore for non-existent file (#752)b271d2b
Replace PEP references with PUG links (#750)Updates
platformdirs
from 4.1.0 to 4.2.0Release notes
Sourced from platformdirs's releases.
Changelog
Sourced from platformdirs's changelog.
Commits
bc4d114
Add convenience methods toPlatformDirsAPI
that allow iterating over both u...0d8beea
[pre-commit.ci] pre-commit autoupdate (#260)0dcc051
[pre-commit.ci] pre-commit autoupdate (#257)3ce2035
Fix 2 typos about XDG_DATA_DIR (#256)783376b
[pre-commit.ci] pre-commit autoupdate (#255)f86cfb8
[pre-commit.ci] pre-commit autoupdate (#254)5cbfd8d
[pre-commit.ci] pre-commit autoupdate (#253)9f684a6
[pre-commit.ci] pre-commit autoupdate (#251)1db2522
Bump actions/setup-python from 4 to 5 (#248)4b68392
[pre-commit.ci] pre-commit autoupdate (#247)Updates
pyasn1
from 0.5.1 to 0.6.0Release notes
Sourced from pyasn1's releases.
Changelog
Sourced from pyasn1's changelog.
Commits
7391c7b
Prepare release 0.6.081ce8d0
Remove support for EOL Pythond17e0e1
Add support for RELATIVE-OID (#48)05eac97
Link fix (Layman's Guide) (#50)Updates
pycparser
from 2.21 to 2.22Release notes
Sourced from pycparser's releases.
Changelog
Sourced from pycparser's changelog.
Commits
129d32e
Prepare for release 2.22c3e2644
update CHANGES file for future changesc500fb6
ply: Make generated lextab.py deterministic (#531)f740995
Add support for Python 3.12 (#515)6cf69df
New example to generate AST from scratch (#507)50a26ac
Remove unneeded import in an exampled86a9e5
Remove from future imports from all files in this repoa9f073e
Remove from future imports in examples670979b
Update SECURITY.md9e8cd29
Create a Security Policy (#499)Updates
typing-extensions
from 4.9.0 to 4.11.0Release notes
Sourced from typing-extensions's releases.
... (truncated)
Changelog
Sourced from typing-extensions's changelog.
Commits
d4d929d
Prepare release 4.11.0 (#363)94bec44
Prepare release 4.11.0rc1 (#362)10648b6
Fix tests on 3.13.0a5 (#358)8170fc7
Fix runtime behaviour of PEP 696 (#293)d34c389
Try to fix GH actions syntax (#355)d409ec9
Run CPython test suite in our CI (#353)9d1689e
Fix indentation in TypedDict docs (#352)4fdc09d
Third-party tests: don't run pydantic tests on pypy (#351)3304a5f
Stabilise third party tests (#348)c3dc681
Make sure thatReadOnly
is removed when using `get_type_hints(include_extra...Updates
urllib3
from 2.2.0 to 2.2.1Release notes
Sourced from urllib3's releases.
Changelog
Sourced from urllib3's changelog.
Commits
54d6edf
Release 2.2.149b2dda
Stop casting request headers to HTTPHeaderDict (#3344)e22f651
Fix docstring of retries parameterfa54179
Distinguish between truncated and excess content in response (#3273)cfe52f9
Fix InsecureRequestWarning for HTTPS Emscripten requests (#3333)25155d7
Ensure no remote connections during testing (#3328)12f9233
Bump cryptography to 42.0.2 and PyOpenSSL to 24.0.0 (#3340)9929d3c
Add nox session to start local Pyodide consoleaa8d3dd
Fix ssl_version tests for upcoming migration to pytest 823f2287
Remove TODO about informational responses (#3319)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 commands and options
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