Bump black from 23.12.1 to 24.3.0
Bumps black from 23.12.1 to 24.3.0.
Release notes
Sourced from black's releases.
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)24.2.0
Stable style
- Fixed a bug where comments where mistakenly removed along with redundant parentheses (#4218)
Preview style
- Move the
hug_parens_with_braces_and_square_brackets
feature to the unstable style due to an outstanding crash and proposed formatting tweaks (#4198)- Fixed a bug where base expressions caused inconsistent formatting of ** in tenary expression (#4154)
- Checking for newline before adding one on docstring that is almost at the line limit (#4185)
- Remove redundant parentheses in
case
statementif
guards (#4214).Configuration
... (truncated)
Changelog
Sourced from black's changelog.
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)24.2.0
Stable style
- Fixed a bug where comments where mistakenly removed along with redundant parentheses (#4218)
Preview style
- Move the
hug_parens_with_braces_and_square_brackets
feature to the unstable style due to an outstanding crash and proposed formatting tweaks (#4198)- Fixed a bug where base expressions caused inconsistent formatting of ** in tenary expression (#4154)
- Checking for newline before adding one on docstring that is almost at the line limit (#4185)
- Remove redundant parentheses in
case
statementif
guards (#4214).
... (truncated)
Commits
-
552baf8
Prepare release 24.3.0 (#4279) -
f000936
Fix catastrophic performance in lines_with_leading_tabs_expanded() (#4278) -
7b5a657
Fix --line-ranges behavior when ranges are at EOF (#4273) -
1abcffc
Use regex where we ignore case on windows (#4252) -
719e674
Fix 4227: Improve documentation for --quiet --check (#4236) -
e5510af
update plugin url for Thonny (#4259) -
6af7d11
Fix AST safety check false negative (#4270) -
f03ee11
Ensureblib2to3.pygram
is initialized before use (#4224) -
e4bfedb
fix: Don't move comments while splitting delimiters (#4248) -
d0287e1
Make trailing comma logic more concise (#4202) - Additional commits viewable in compare view