From 9a75de29739095ace6a52d7d8bae4edc3522c84e Mon Sep 17 00:00:00 2001 From: Stephane Odul Date: Mon, 12 Feb 2024 12:52:16 -0800 Subject: [PATCH 1/2] V4.0.1 with the 3.12.1 regression flagged explicitly. --- .github/workflows/ci.yml | 10 +++++----- CHANGELOG.md | 14 +++++++++++++- README.md | 2 +- setup.cfg | 4 +++- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b9cfe3..26a0d95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [macos-latest, ubuntu-latest, windows-latest] python-version: [ - "3.8", "3.9", "3.10", "3.11", "3.12.0", + "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9", "pypy3.10" ] fail-fast: false @@ -35,11 +35,11 @@ jobs: - name: Format run: black --check --diff green example - if: matrix.python-version == '3.12.0' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' - name: Mypy run: mypy green example - if: matrix.python-version == '3.12.0' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' - name: Test run: | @@ -50,10 +50,10 @@ jobs: run: | pip install --upgrade coveralls green -tvvvvr green - if: matrix.python-version == '3.12.0' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' - name: Coveralls run: coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: matrix.python-version == '3.12.0' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' diff --git a/CHANGELOG.md b/CHANGELOG.md index ddd04ba..48bfdd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,20 @@ # Unreleased #### Date TBD -- Cleanup test_runner.py to more modern Python style. +# Version 4.0.1 +#### 12 Feb 2024 + +Note that we are explicitly flagging Python 3.12.1 as incompatible due to a regression +that was fixed in 3.12.2. +If you are on 3.12.1, then `pip` will try to install green 4.0.0, but it will +likely crash if you have skipped tests, so you will either need to upgrade to +python 3.12.2, or newer, or rollback to python 3.12.0. + +- Cleaned-up existing code to more modern python 3 style, including + comprehensive type annotation. - Simplify green's dev testing setup. +- Explicitly flag 3.12.1 as incompatible due to https://github.com/python/cpython/issues/113267. + Tracked in #277. # Version 4.0.0 #### 16 Jan 2024 diff --git a/README.md b/README.md index 7fd7a36..3ee4cb4 100644 --- a/README.md +++ b/README.md @@ -470,7 +470,7 @@ shines when you start getting more verbose: **In a real terminal, this output is syntax highlighted** $ green -vvv proj - Green 3.0.0, Coverage 4.5.2, Python 3.7.4 + Green 4.1.0, Coverage 7.4.1, Python 3.12.2 test_foo TestAnswer diff --git a/setup.cfg b/setup.cfg index 3163e0a..c68d4cd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -66,7 +66,9 @@ test_suite='green.test' [options] -python_requires = >=3.8 +# Known bug in python 3.12.1 breaks green when skipping tests. +# +python_requires = >=3.8, !=3.12.1 install_requires = file:requirements.txt include_package_data = True packages = find: From a1259513fa6e150e9b143d3fcf55905b20a6969a Mon Sep 17 00:00:00 2001 From: Stephane Odul Date: Mon, 12 Feb 2024 12:59:44 -0800 Subject: [PATCH 2/2] use 3.12.2 explicitly in GH Action --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26a0d95..fff444f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [macos-latest, ubuntu-latest, windows-latest] python-version: [ - "3.8", "3.9", "3.10", "3.11", "3.12", + "3.8", "3.9", "3.10", "3.11", "3.12.2", "pypy3.8", "pypy3.9", "pypy3.10" ] fail-fast: false @@ -35,11 +35,11 @@ jobs: - name: Format run: black --check --diff green example - if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12.2' && matrix.os == 'ubuntu-latest' - name: Mypy run: mypy green example - if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12.2' && matrix.os == 'ubuntu-latest' - name: Test run: | @@ -50,10 +50,10 @@ jobs: run: | pip install --upgrade coveralls green -tvvvvr green - if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12.2' && matrix.os == 'ubuntu-latest' - name: Coveralls run: coveralls --service=github env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' + if: matrix.python-version == '3.12.2' && matrix.os == 'ubuntu-latest'