Prepare release 23.11.0 (#4032)

This commit is contained in:
Jelle Zijlstra 2023-11-07 20:44:46 -08:00 committed by GitHub
parent 72e7a2e43e
commit 2a1c67e0b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 66 deletions

View File

@ -1,78 +1,49 @@
# Change Log # Change Log
## Unreleased ## 23.11.0
### Highlights ### Highlights
<!-- Include any especially major or disruptive changes here -->
- Support formatting ranges of lines with the new `--line-ranges` command-line option - Support formatting ranges of lines with the new `--line-ranges` command-line option
(#4020). (#4020)
### Stable style ### Stable style
- Fix crash on formatting bytes strings that look like docstrings (#4003) - Fix crash on formatting bytes strings that look like docstrings (#4003)
- Fix crash when whitespace followed a backslash before newline in a docstring (#4008) - Fix crash when whitespace followed a backslash before newline in a docstring (#4008)
- Fix standalone comments inside complex blocks crashing Black (#4016) - Fix standalone comments inside complex blocks crashing Black (#4016)
- Fix crash on formatting code like `await (a ** b)` (#3994) - Fix crash on formatting code like `await (a ** b)` (#3994)
- No longer treat leading f-strings as docstrings. This matches Python's behaviour and - No longer treat leading f-strings as docstrings. This matches Python's behaviour and
fixes a crash (#4019) fixes a crash (#4019)
### Preview style ### Preview style
- Multiline dictionaries and lists that are the sole argument to a function are now - Multiline dicts and lists that are the sole argument to a function are now indented
indented less (#3964) less (#3964)
- Multiline list and dict unpacking as the sole argument to a function is now also - Multiline unpacked dicts and lists as the sole argument to a function are now also
indented less (#3992) indented less (#3992)
- In f-string debug expressions preserve quote types that are visible in the final - In f-string debug expressions, quote types that are visible in the final string are
string (#4005) now preserved (#4005)
- Fix a bug where long `case` blocks were not split into multiple lines. Also enable - Fix a bug where long `case` blocks were not split into multiple lines. Also enable
general trailing comma rules on `case` blocks (#4024) general trailing comma rules on `case` blocks (#4024)
- Keep requiring two empty lines between module-level docstring and first function or - Keep requiring two empty lines between module-level docstring and first function or
class definition. (#4028) class definition (#4028)
- Add support for single-line format skip with other comments on the same line (#3959)
### Configuration ### Configuration
- Add support for single-line format skip with other comments on the same line (#3959)
- Consistently apply force exclusion logic before resolving symlinks (#4015) - Consistently apply force exclusion logic before resolving symlinks (#4015)
- Fix a bug in the matching of absolute path names in `--include` (#3976) - Fix a bug in the matching of absolute path names in `--include` (#3976)
### Packaging
<!-- Changes to how Black is packaged, such as dependency requirements -->
### Parser
<!-- Changes to the parser or to version autodetection -->
### Performance ### Performance
<!-- Changes that improve Black's performance. -->
- Fix mypyc builds on arm64 on macOS (#4017) - Fix mypyc builds on arm64 on macOS (#4017)
### Output
<!-- Changes to Black's terminal output and error messages -->
### _Blackd_
<!-- Changes to blackd -->
### Integrations ### Integrations
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
- Black's pre-commit integration will now run only on git hooks appropriate for a code - Black's pre-commit integration will now run only on git hooks appropriate for a code
formatter (#3940) formatter (#3940)
### Documentation
<!-- Major changes to documentation and policies. Small docs changes
don't need a changelog entry. -->
## 23.10.1 ## 23.10.1
### Highlights ### Highlights
@ -327,8 +298,6 @@ versions separately.
### Stable style ### Stable style
<!-- Changes that affect Black's stable style -->
- Introduce the 2023 stable style, which incorporates most aspects of last year's - Introduce the 2023 stable style, which incorporates most aspects of last year's
preview style (#3418). Specific changes: preview style (#3418). Specific changes:
- Enforce empty lines before classes and functions with sticky leading comments - Enforce empty lines before classes and functions with sticky leading comments
@ -362,8 +331,6 @@ versions separately.
### Preview style ### Preview style
<!-- Changes that affect Black's preview style -->
- Format hex codes in unicode escape sequences in string literals (#2916) - Format hex codes in unicode escape sequences in string literals (#2916)
- Add parentheses around `if`-`else` expressions (#2278) - Add parentheses around `if`-`else` expressions (#2278)
- Improve performance on large expressions that contain many strings (#3467) - Improve performance on large expressions that contain many strings (#3467)
@ -394,15 +361,11 @@ versions separately.
### Configuration ### Configuration
<!-- Changes to how Black can be configured -->
- Black now tries to infer its `--target-version` from the project metadata specified in - Black now tries to infer its `--target-version` from the project metadata specified in
`pyproject.toml` (#3219) `pyproject.toml` (#3219)
### Packaging ### Packaging
<!-- Changes to how Black is packaged, such as dependency requirements -->
- Upgrade mypyc from `0.971` to `0.991` so mypycified _Black_ can be built on armv7 - Upgrade mypyc from `0.971` to `0.991` so mypycified _Black_ can be built on armv7
(#3380) (#3380)
- This also fixes some crashes while using compiled Black with a debug build of - This also fixes some crashes while using compiled Black with a debug build of
@ -415,8 +378,6 @@ versions separately.
### Output ### Output
<!-- Changes to Black's terminal output and error messages -->
- Calling `black --help` multiple times will return the same help contents each time - Calling `black --help` multiple times will return the same help contents each time
(#3516) (#3516)
- Verbose logging now shows the values of `pyproject.toml` configuration variables - Verbose logging now shows the values of `pyproject.toml` configuration variables
@ -426,25 +387,18 @@ versions separately.
### Integrations ### Integrations
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
- Move 3.11 CI to normal flow now that all dependencies support 3.11 (#3446) - Move 3.11 CI to normal flow now that all dependencies support 3.11 (#3446)
- Docker: Add new `latest_prerelease` tag automation to follow latest black alpha - Docker: Add new `latest_prerelease` tag automation to follow latest black alpha
release on docker images (#3465) release on docker images (#3465)
### Documentation ### Documentation
<!-- Major changes to documentation and policies. Small docs changes
don't need a changelog entry. -->
- Expand `vim-plug` installation instructions to offer more explicit options (#3468) - Expand `vim-plug` installation instructions to offer more explicit options (#3468)
## 22.12.0 ## 22.12.0
### Preview style ### Preview style
<!-- Changes that affect Black's preview style -->
- Enforce empty lines before classes and functions with sticky leading comments (#3302) - Enforce empty lines before classes and functions with sticky leading comments (#3302)
- Reformat empty and whitespace-only files as either an empty file (if no newline is - Reformat empty and whitespace-only files as either an empty file (if no newline is
present) or as a single newline character (if a newline is present) (#3348) present) or as a single newline character (if a newline is present) (#3348)
@ -457,8 +411,6 @@ versions separately.
### Configuration ### Configuration
<!-- Changes to how Black can be configured -->
- Fix incorrectly applied `.gitignore` rules by considering the `.gitignore` location - Fix incorrectly applied `.gitignore` rules by considering the `.gitignore` location
and the relative path to the target file (#3338) and the relative path to the target file (#3338)
- Fix incorrectly ignoring `.gitignore` presence when more than one source directory is - Fix incorrectly ignoring `.gitignore` presence when more than one source directory is
@ -466,16 +418,12 @@ versions separately.
### Parser ### Parser
<!-- Changes to the parser or to version autodetection -->
- Parsing support has been added for walruses inside generator expression that are - Parsing support has been added for walruses inside generator expression that are
passed as function args (for example, passed as function args (for example,
`any(match := my_re.match(text) for text in texts)`) (#3327). `any(match := my_re.match(text) for text in texts)`) (#3327).
### Integrations ### Integrations
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
- Vim plugin: Optionally allow using the system installation of Black via - Vim plugin: Optionally allow using the system installation of Black via
`let g:black_use_virtualenv = 0`(#3309) `let g:black_use_virtualenv = 0`(#3309)

View File

@ -8,7 +8,7 @@ Use [pre-commit](https://pre-commit.com/). Once you
repos: repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster # Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror - repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1 rev: 23.11.0
hooks: hooks:
- id: black - id: black
# It is recommended to specify the latest version of Python # It is recommended to specify the latest version of Python
@ -35,7 +35,7 @@ include Jupyter Notebooks. To use this hook, simply replace the hook's `id: blac
repos: repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster # Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror - repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.10.1 rev: 23.11.0
hooks: hooks:
- id: black-jupyter - id: black-jupyter
# It is recommended to specify the latest version of Python # It is recommended to specify the latest version of Python

View File

@ -211,8 +211,8 @@ configuration file for consistent results across environments.
```console ```console
$ black --version $ black --version
black, 23.10.1 (compiled: yes) black, 23.11.0 (compiled: yes)
$ black --required-version 23.10.1 -c "format = 'this'" $ black --required-version 23.11.0 -c "format = 'this'"
format = "this" format = "this"
$ black --required-version 31.5b2 -c "still = 'beta?!'" $ black --required-version 31.5b2 -c "still = 'beta?!'"
Oh no! 💥 💔 💥 The required version does not match the running version! Oh no! 💥 💔 💥 The required version does not match the running version!
@ -303,7 +303,7 @@ You can check the version of _Black_ you have installed using the `--version` fl
```console ```console
$ black --version $ black --version
black, 23.10.1 black, 23.11.0
``` ```
#### `--config` #### `--config`