Skip to content
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

Prepare release 24.3.0 #4279

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 2 additions & 36 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Change Log

## Unreleased
## 24.3.0

### Highlights

<!-- Include any especially major or disruptive changes here -->

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
Expand All @@ -16,56 +14,24 @@ incorrect changes to certain f-strings that are valid in Python 3.12 and higher.

### Stable style

<!-- Changes that affect Black's 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)
- Fixed a bug where line-ranges exceeding the last code line would not work as expected
- Fix a bug where line-ranges exceeding the last code line would not work as expected
(#4273)

### Preview style

<!-- Changes that affect Black's preview style -->

### Configuration

<!-- Changes to how Black can be configured -->

### Packaging

<!-- Changes to how Black is packaged, such as dependency requirements -->

### Parser

<!-- Changes to the parser or to version autodetection -->

### Performance

- Fix catastrophic performance on docstrings that contain large numbers of leading tab
characters. This fixes
[CVE-2024-21503](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-21503).
(#4278)

### Output

<!-- Changes to Black's terminal output and error messages -->

### _Blackd_

<!-- Changes to blackd -->

### Integrations

<!-- For example, Docker, GitHub Actions, pre-commit, editors -->

### Documentation

- Note what happens when `--check` is used with `--quiet` (#4236)
<!-- Major changes to documentation and policies. Small docs changes
don't need a changelog entry. -->

## 24.2.0

Expand Down
4 changes: 2 additions & 2 deletions docs/integrations/source_version_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Use [pre-commit](https://pre-commit.com/). Once you
repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
rev: 24.3.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
Expand All @@ -35,7 +35,7 @@ include Jupyter Notebooks. To use this hook, simply replace the hook's `id: blac
repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
rev: 24.3.0
hooks:
- id: black-jupyter
# It is recommended to specify the latest version of Python
Expand Down
6 changes: 3 additions & 3 deletions docs/usage_and_configuration/the_basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ configuration file for consistent results across environments.

```console
$ black --version
black, 24.2.0 (compiled: yes)
$ black --required-version 24.2.0 -c "format = 'this'"
black, 24.3.0 (compiled: yes)
$ black --required-version 24.3.0 -c "format = 'this'"
format = "this"
$ black --required-version 31.5b2 -c "still = 'beta?!'"
Oh no! 💥 💔 💥 The required version does not match the running version!
Expand Down Expand Up @@ -366,7 +366,7 @@ You can check the version of _Black_ you have installed using the `--version` fl

```console
$ black --version
black, 24.2.0
black, 24.3.0
```

#### `--config`
Expand Down