Skip to content

Commit b0d1fba

Browse files
Prepare release 23.1.0 (#3536)
Co-authored-by: Richard Si <[email protected]>
1 parent 69ca0a4 commit b0d1fba

File tree

3 files changed

+65
-17
lines changed

3 files changed

+65
-17
lines changed

CHANGES.md

+63-15
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,64 @@
1010

1111
<!-- Changes that affect Black's stable style -->
1212

13+
### Preview style
14+
15+
<!-- Changes that affect Black's preview style -->
16+
17+
### Configuration
18+
19+
<!-- Changes to how Black can be configured -->
20+
21+
### Packaging
22+
23+
<!-- Changes to how Black is packaged, such as dependency requirements -->
24+
25+
### Parser
26+
27+
<!-- Changes to the parser or to version autodetection -->
28+
29+
### Performance
30+
31+
<!-- Changes that improve Black's performance. -->
32+
33+
### Output
34+
35+
<!-- Changes to Black's terminal output and error messages -->
36+
37+
### _Blackd_
38+
39+
<!-- Changes to blackd -->
40+
41+
### Integrations
42+
43+
<!-- For example, Docker, GitHub Actions, pre-commit, editors -->
44+
45+
### Documentation
46+
47+
<!-- Major changes to documentation and policies. Small docs changes
48+
don't need a changelog entry. -->
49+
50+
## 23.1.0
51+
52+
### Highlights
53+
54+
This is the first release of 2023, and following our
55+
[stability policy](https://black.readthedocs.io/en/stable/the_black_code_style/index.html#stability-policy),
56+
it comes with a number of improvements to our stable style, including improvements to
57+
empty line handling, removal of redundant parentheses in several contexts, and output
58+
that highlights implicitly concatenated strings better.
59+
60+
There are also many changes to the preview style; try out `black --preview` and give us
61+
feedback to help us set the stable style for next year.
62+
63+
In addition to style changes, Black now automatically infers the supported Python
64+
versions from your `pyproject.toml` file, removing the need to set Black's target
65+
versions separately.
66+
67+
### Stable style
68+
69+
<!-- Changes that affect Black's stable style -->
70+
1371
- Introduce the 2023 stable style, which incorporates most aspects of last year's
1472
preview style (#3418). Specific changes:
1573
- Enforce empty lines before classes and functions with sticky leading comments
@@ -45,9 +103,9 @@
45103

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

48-
- Format hex code in unicode escape sequences in string literals (#2916)
106+
- Format hex codes in unicode escape sequences in string literals (#2916)
49107
- Add parentheses around `if`-`else` expressions (#2278)
50-
- Improve the performance on large expressions that contain many strings (#3467)
108+
- Improve performance on large expressions that contain many strings (#3467)
51109
- Fix a crash in preview style with assert + parenthesized string (#3415)
52110
- Fix crashes in preview style with walrus operators used in function return annotations
53111
and except clauses (#3423)
@@ -86,20 +144,14 @@
86144

87145
- Upgrade mypyc from `0.971` to `0.991` so mypycified _Black_ can be built on armv7
88146
(#3380)
147+
- This also fixes some crashes while using compiled Black with a debug build of
148+
CPython
89149
- Drop specific support for the `tomli` requirement on 3.11 alpha releases, working
90150
around a bug that would cause the requirement not to be installed on any non-final
91151
Python releases (#3448)
92152
- Black now depends on `packaging` version `22.0` or later. This is required for new
93153
functionality that needs to parse part of the project metadata (#3219)
94154

95-
### Parser
96-
97-
<!-- Changes to the parser or to version autodetection -->
98-
99-
### Performance
100-
101-
<!-- Changes that improve Black's performance. -->
102-
103155
### Output
104156

105157
<!-- Changes to Black's terminal output and error messages -->
@@ -111,15 +163,11 @@
111163
- Fix false symlink detection messages in verbose output due to using an incorrect
112164
relative path to the project root (#3385)
113165

114-
### _Blackd_
115-
116-
<!-- Changes to blackd -->
117-
118166
### Integrations
119167

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

122-
- Move 3.11 CI to normal flow now all dependencies support 3.11 (#3446)
170+
- Move 3.11 CI to normal flow now that all dependencies support 3.11 (#3446)
123171
- Docker: Add new `latest_prerelease` tag automation to follow latest black alpha
124172
release on docker images (#3465)
125173

docs/integrations/source_version_control.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Use [pre-commit](https://pre-commit.com/). Once you
77
```yaml
88
repos:
99
- repo: https://github.com/psf/black
10-
rev: 22.12.0
10+
rev: 23.1.0
1111
hooks:
1212
- id: black
1313
# It is recommended to specify the latest version of Python

docs/usage_and_configuration/the_basics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ You can check the version of _Black_ you have installed using the `--version` fl
178178

179179
```console
180180
$ black --version
181-
black, version 22.12.0
181+
black, version 23.1.0
182182
```
183183

184184
An option to require a specific version to be running is also provided.

0 commit comments

Comments
 (0)