From 66f3af1364ba6cbbb77d3f19197e6509899e4b3f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 31 Aug 2023 11:48:48 -0300 Subject: [PATCH] Drop EOL Python 3.6 and 3.7 Also execute pyupgrade --py38-plus --- .github/workflows/main.yml | 13 ++++--------- CHANGELOG.rst | 6 ++++++ setup.py | 3 +-- src/pytest_regressions/ndarrays_regression.py | 2 +- tox.ini | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7968871..c28f4b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,16 +10,9 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.7", "3.8", "3.9", "3.10"] + python: ["3.8", "3.9", "3.10", "3.11"] os: [ubuntu-latest, windows-latest] include: - # non-matrix listed runs (python 3.6 is not supported with ubuntu-latest). - - python: 3.6 - os: ubuntu-20.04 - tox_env: "py36" - - python: 3.6 - os: windows-latest - tox_env: "py36" - python: "3.7" tox_env: "py37" - python: "3.8" @@ -28,6 +21,8 @@ jobs: tox_env: "py39" - python: "3.10" tox_env: "py310,pytest6" + - python: "3.11" + tox_env: "py311 exclude: - python: "3.6" os: windows-latest @@ -59,7 +54,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: "3.7" + python-version: "3.11" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 66ac02f..33bac0b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,9 @@ +2.5.0 (2023-08-31) +------------------ + +* Dropped support for EOL Python 3.6 and Python 3.7. +* Added support for Python 3.11. + 2.4.3 (2023-08-30) ------------------ diff --git a/setup.py b/setup.py index b7cf9da..6d50175 100644 --- a/setup.py +++ b/setup.py @@ -55,11 +55,10 @@ def read(fname: str) -> str: "Intended Audience :: Developers", "Topic :: Software Development :: Testing", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation :: CPython", "Operating System :: OS Independent", "License :: OSI Approved :: MIT License", diff --git a/src/pytest_regressions/ndarrays_regression.py b/src/pytest_regressions/ndarrays_regression.py index f4fa66c..1ade106 100644 --- a/src/pytest_regressions/ndarrays_regression.py +++ b/src/pytest_regressions/ndarrays_regression.py @@ -253,7 +253,7 @@ def _load_fn(self, filename: Path) -> Dict[str, Any]: with open(filename, "rb") as f: result = dict(np.load(f)) except (zipfile.BadZipFile, ValueError) as e: - raise IOError( + raise OSError( f"NPZ file {filename} could not be loaded. Corrupt file?" ) from e return result diff --git a/tox.ini b/tox.ini index 8bb3de2..069ba2d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,py38,py39,py310,pytest6, docs,linting +envlist = py38,py39,py310,py311,pytest6 [testenv] download = true