Prepare release 24.1.0 (#4170)

This commit is contained in:
Jelle Zijlstra 2024-01-25 20:35:21 -08:00 committed by GitHub
parent 4f47cac192
commit 0e6e46b9eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 47 deletions

View File

@ -1,11 +1,9 @@
# Change Log # Change Log
## Unreleased ## 24.1.0
### Highlights ### Highlights
<!-- Include any especially major or disruptive changes here -->
This release introduces the new 2024 stable style (#4106), stabilizing the following This release introduces the new 2024 stable style (#4106), stabilizing the following
changes: changes:
@ -44,8 +42,6 @@ year's stable style.
### Stable style ### Stable style
<!-- Changes that affect Black's stable style -->
Several bug fixes were made in features that are moved to the stable style in this Several bug fixes were made in features that are moved to the stable style in this
release: release:
@ -59,14 +55,12 @@ release:
### Preview style ### Preview style
<!-- Changes that affect Black's preview style -->
- Add `--unstable` style, covering preview features that have known problems that would - Add `--unstable` style, covering preview features that have known problems that would
block them from going into the stable style. Also add the `--enable-unstable-feature` block them from going into the stable style. Also add the `--enable-unstable-feature`
flag; for example, use flag; for example, use
`--enable-unstable-feature hug_parens_with_braces_and_square_brackets` to apply this `--enable-unstable-feature hug_parens_with_braces_and_square_brackets` to apply this
preview style throughout 2024, even if a later Black release downgrades the feature to preview feature throughout 2024, even if a later Black release downgrades the feature
unstable (#4096) to unstable (#4096)
- Format module docstrings the same as class and function docstrings (#4095) - Format module docstrings the same as class and function docstrings (#4095)
- Fix crash when using a walrus in a dictionary (#4155) - Fix crash when using a walrus in a dictionary (#4155)
- Fix unnecessary parentheses when wrapping long dicts (#4135) - Fix unnecessary parentheses when wrapping long dicts (#4135)
@ -74,48 +68,18 @@ release:
### Configuration ### Configuration
<!-- Changes to how Black can be configured --> - Print warning when configuration in `pyproject.toml` contains an invalid key (#4165)
- Fix symlink handling, properly ignoring symlinks that point outside of root (#4161)
- Print warning when toml config contains an invalid key (#4165)
- Fix symlink handling, properly catch and ignore symlinks that point outside of root
(#4161)
- Fix cache mtime logic that resulted in false positive cache hits (#4128) - Fix cache mtime logic that resulted in false positive cache hits (#4128)
- Remove the long-deprecated `--experimental-string-processing` flag. This feature can - Remove the long-deprecated `--experimental-string-processing` flag. This feature can
currently be enabled with `--preview --enable-unstable-feature string_processing`. currently be enabled with `--preview --enable-unstable-feature string_processing`.
(#4096) (#4096)
### Packaging
<!-- Changes to how Black is packaged, such as dependency requirements -->
### Parser
<!-- Changes to the parser or to version autodetection -->
### Performance
<!-- Changes that improve Black's performance. -->
### Output
<!-- Changes to Black's terminal output and error messages -->
### _Blackd_
<!-- Changes to blackd -->
### Integrations ### Integrations
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
- Revert the change to run Black's pre-commit integration only on specific git hooks - Revert the change to run Black's pre-commit integration only on specific git hooks
(#3940) for better compatibility with older versions of pre-commit (#4137) (#3940) for better compatibility with older versions of pre-commit (#4137)
### Documentation
<!-- Major changes to documentation and policies. Small docs changes
don't need a changelog entry. -->
## 23.12.1 ## 23.12.1
### Packaging ### Packaging

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.12.1 rev: 24.1.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.12.1 rev: 24.1.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

@ -266,8 +266,8 @@ configuration file for consistent results across environments.
```console ```console
$ black --version $ black --version
black, 23.12.1 (compiled: yes) black, 24.1.0 (compiled: yes)
$ black --required-version 23.12.1 -c "format = 'this'" $ black --required-version 24.1.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!
@ -363,7 +363,7 @@ You can check the version of _Black_ you have installed using the `--version` fl
```console ```console
$ black --version $ black --version
black, 23.12.1 black, 24.1.0
``` ```
#### `--config` #### `--config`

View File

@ -169,7 +169,9 @@ def get_next_version(self) -> str:
calver_parts = base_calver.split(".") calver_parts = base_calver.split(".")
base_calver = f"{calver_parts[0]}.{int(calver_parts[1])}" # Remove leading 0 base_calver = f"{calver_parts[0]}.{int(calver_parts[1])}" # Remove leading 0
git_tags = get_git_tags() git_tags = get_git_tags()
same_month_releases = [t for t in git_tags if t.startswith(base_calver)] same_month_releases = [
t for t in git_tags if t.startswith(base_calver) and "a" not in t
]
if len(same_month_releases) < 1: if len(same_month_releases) < 1:
return f"{base_calver}.0" return f"{base_calver}.0"
same_month_version = same_month_releases[-1].split(".", 2)[-1] same_month_version = same_month_releases[-1].split(".", 2)[-1]