Prevent use on Python 3.12.5 (#4447)
Fixes #4446 See https://github.com/python/cpython/issues/123821 It's possible this is too strict? We could instead do this anytime the AST safety check fails, but feels weird to have that happen non-deterministically
This commit is contained in:
parent
ac28187bf4
commit
9e13708be8
3
.github/workflows/doc.yml
vendored
3
.github/workflows/doc.yml
vendored
@ -26,7 +26,8 @@ jobs:
|
|||||||
- name: Set up latest Python
|
- name: Set up latest Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "*"
|
python-version: "3.13"
|
||||||
|
allow-prereleases: true
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
2
.github/workflows/fuzz.yml
vendored
2
.github/workflows/fuzz.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.4", "3.13"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
3
.github/workflows/lint.yml
vendored
3
.github/workflows/lint.yml
vendored
@ -26,7 +26,8 @@ jobs:
|
|||||||
- name: Set up latest Python
|
- name: Set up latest Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "*"
|
python-version: "3.13"
|
||||||
|
allow-prereleases: true
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
3
.github/workflows/pypi_upload.yml
vendored
3
.github/workflows/pypi_upload.yml
vendored
@ -23,7 +23,8 @@ jobs:
|
|||||||
- name: Set up latest Python
|
- name: Set up latest Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "*"
|
python-version: "3.13"
|
||||||
|
allow-prereleases: true
|
||||||
|
|
||||||
- name: Install latest pip, build, twine
|
- name: Install latest pip, build, twine
|
||||||
run: |
|
run: |
|
||||||
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.9"]
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12.4", "3.13", "pypy-3.9"]
|
||||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -99,7 +99,7 @@ jobs:
|
|||||||
- name: Set up latest Python
|
- name: Set up latest Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "*"
|
python-version: "3.12.4"
|
||||||
|
|
||||||
- name: Install black with uvloop
|
- name: Install black with uvloop
|
||||||
run: |
|
run: |
|
||||||
|
2
.github/workflows/upload_binary.yml
vendored
2
.github/workflows/upload_binary.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
|||||||
- name: Set up latest Python
|
- name: Set up latest Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "*"
|
python-version: "3.12.4"
|
||||||
|
|
||||||
- name: Install Black and PyInstaller
|
- name: Install Black and PyInstaller
|
||||||
run: |
|
run: |
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
<!-- Include any especially major or disruptive changes here -->
|
<!-- Include any especially major or disruptive changes here -->
|
||||||
|
|
||||||
- Black now officially supports Python 3.13 (#4436)
|
- Black now officially supports Python 3.13 (#4436)
|
||||||
|
- Black will issue an error when used with Python 3.12.5, due to an upstream memory
|
||||||
|
safety issue in Python 3.12.5 that can cause Black's AST safety checks to fail. Please
|
||||||
|
use Python 3.12.6 or Python 3.12.4 instead. (#4447)
|
||||||
|
|
||||||
### Stable style
|
### Stable style
|
||||||
|
|
||||||
|
@ -549,6 +549,14 @@ def main( # noqa: C901
|
|||||||
"""The uncompromising code formatter."""
|
"""The uncompromising code formatter."""
|
||||||
ctx.ensure_object(dict)
|
ctx.ensure_object(dict)
|
||||||
|
|
||||||
|
if sys.version_info[:3] == (3, 12, 5):
|
||||||
|
out(
|
||||||
|
"Python 3.12.5 has a memory safety issue that can cause Black's "
|
||||||
|
"AST safety checks to fail. "
|
||||||
|
"Please upgrade to Python 3.12.6 or downgrade to Python 3.12.4"
|
||||||
|
)
|
||||||
|
ctx.exit(1)
|
||||||
|
|
||||||
if src and code is not None:
|
if src and code is not None:
|
||||||
out(
|
out(
|
||||||
main.get_usage(ctx)
|
main.get_usage(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user