From ff726c4f6f3bed1a4e3ef76b7fd3830ada11742a Mon Sep 17 00:00:00 2001 From: Christian von Schultz Date: Wed, 8 May 2024 09:41:00 +0200 Subject: [PATCH] Add Python 3.12, retire Python 3.7 Assuming we want to support four active Python versions, retire Python 3.7, which is end-of-life since nearly a year ago, and add support for Python 3.12. New Python versions are released once a year, and make for a good reason to make a release to PyPI, even if there haven't been any major changes to the code base. Not making a release for a year results in warnings such as "An important project maintenance signal to consider for sphobjinv is that it hasn't seen any new versions released to PyPI in the past 12 months, and could be considered as a discontinued project, or that which receives low attention from its maintainers" on https://snyk.io/advisor/python/sphobjinv, which companies use to determine if a project is an acceptable dependency. --- .github/workflows/ci_tests.yml | 2 +- CHANGELOG.md | 9 +++++++++ CONTRIBUTING.md | 8 ++++---- azure-pipelines.yml | 8 ++++---- setup.cfg | 4 ++-- tox.ini | 8 ++++---- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 7565e8ec..c11db3d2 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ['3.7', '3.8', '3.9', '3.11'] + python: ['3.8', '3.9', '3.11', '3.12'] if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f4c74c4..3c7a01df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project strives to adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +### Unreleased + +#### Added + + * The project now supports Python 3.12. + +#### Removed + + * Removed support for Python 3.7, which is end-of-life. ### [2.3.1] - 2022-11-29 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b2a915c7..6e9297af 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,7 +38,7 @@ $ git clone https://github.com/{you}/sphobjinv ``` Then, create a virtual environment for the project, in whatever location you -prefer. Any Python interpreter 3.7+ *should* work fine. +prefer. Any Python interpreter 3.8+ *should* work fine. I prefer to use `virtualenv` and create in `./env`: @@ -153,8 +153,8 @@ Note that while [`tox`](https://tox.wiki/en/latest/) *is* configured for the project, it is **not** set up to be an everyday test runner. Instead, it's used to execute an extensive matrix of test environments checking for the compatibility of different Python and dependency versions. You can run it if you -want, but you'll need working versions of all of Python 3.7 through 3.11 -installed and on `PATH` as `python3.7`, `python3.8`, etc. The nonlocal test +want, but you'll need working versions of all of Python 3.8 through 3.12 +installed and on `PATH` as `python3.8`, `python3.9`, etc. The nonlocal test suite is run for each `tox` environment, so it's best to use at most two parallel sub-processes to avoid oversaturating your network bandwidth; e.g.: @@ -250,7 +250,7 @@ with `make linkcheck`. Both Github Actions and Azure Pipelines are set up for the project, and should run on any forks of the repository. -Github Actions runs the test suite on Linux for Python 3.7 through 3.11, as well +Github Actions runs the test suite on Linux for Python 3.8 through 3.12, as well as the `flake8` lints and the Sphinx doctests and link-validity testing, and is configured to run on all commits. The workflow can be skipped per-commit by including `[skip ci]` in the commit message. diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d3acc293..1d57f973 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,8 +82,6 @@ stages: - template: azure-coretest.yml parameters: pythons: - py37: - spec: '3.7' py38: spec: '3.8' py39: @@ -92,6 +90,8 @@ stages: spec: '3.10' py311: spec: '3.11' + py312: + spec: '3.12' pypy3: spec: 'pypy3' platforms: [linux] @@ -99,8 +99,6 @@ stages: - template: azure-coretest.yml parameters: pythons: - py37: - spec: '3.7' py38: spec: '3.8' py39: @@ -109,6 +107,8 @@ stages: spec: '3.10' py311: spec: '3.11' + py312: + spec: '3.12' platforms: [windows, macOs] - template: azure-sdisttest.yml diff --git a/setup.cfg b/setup.cfg index 4d0049d1..603d8722 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,11 +25,11 @@ classifiers = Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - 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 :: 3.12 Topic :: Documentation Topic :: Documentation :: Sphinx Topic :: Software Development @@ -44,7 +44,7 @@ install_requires = certifi jsonschema>=3.0 -python_requires = >=3.6 +python_requires = >=3.8 packages = find: package_dir = =src diff --git a/tox.ini b/tox.ini index 8e13b515..b4a07f01 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ minversion=2.0 isolated_build=True envlist= # Test all Python versions on latest lib versions - py3{7,8,9,10,11}-sphx_latest-attrs_latest-jsch_latest + py3{8,9,10,11,12}-sphx_latest-attrs_latest-jsch_latest # Test dev Python version on current in-repo dev lib versions py310-sphx_dev-attrs_dev-jsch_dev # Scan across Sphinx versions @@ -15,9 +15,9 @@ envlist= # Scan jsonschema versions py310-sphx_latest-attrs_latest-jsch_{3_0,3_x,4_0,4_8,dev} # Earliest supported Python and lib versions all together - py37-sphx_1_6_x-attrs_19_2-jsch_3_0 + py38-sphx_1_6_x-attrs_19_2-jsch_3_0 # Spot matrix of early Python, Sphinx, attrs versions - py3{7,8,9}-sphx_{1,2}_x-attrs_{19,20}_2-jsch_latest + py3{8,9}-sphx_{1,2}_x-attrs_{19,20}_2-jsch_latest # Test the specific Sphinx threshold cases where behavior changed py310-sphx_{2_3_1,2_4_0,3_2_1,3_3_0,3_4_0}-attrs_latest-jsch_latest # Simple 'does the sdist install' check @@ -76,11 +76,11 @@ deps= [testenv:linux] platform=linux basepython= + py312: python3.12 py311: python3.11 py310: python3.10 py39: python3.9 py38: python3.8 - py37: python3.7 [testenv:flake8] skip_install=True