From 73d9b4ae5bacc0c425730a49cc6c1cdfdf1f4562 Mon Sep 17 00:00:00 2001 From: Tamas Nepusz Date: Mon, 28 Oct 2024 13:14:00 +0100 Subject: [PATCH] chore: drop support for Python 3.8 as it is now EOL --- .github/workflows/build.yml | 12 ++++++------ README.md | 2 +- setup.py | 9 +++------ src/_igraph/bfsiter.c | 3 --- src/_igraph/dfsiter.c | 3 --- src/_igraph/graphobject.c | 3 --- 6 files changed, 10 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18784b018..80cb71f5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ on: [push, pull_request] env: CIBW_ENVIRONMENT_PASS_LINUX: PYTEST_TIMEOUT CIBW_TEST_COMMAND: "cd {project} && pip install --prefer-binary '.[test]' && python -m pytest -v tests" - CIBW_SKIP: "cp36-* cp37-* pp37-*" + CIBW_SKIP: "cp36-* cp37-* cp38-* pp37-*" PYTEST_TIMEOUT: 60 MACOSX_DEPLOYMENT_TARGET: "10.9" @@ -27,7 +27,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Build wheels (manylinux) uses: pypa/cibuildwheel@v2.21.3 @@ -140,12 +140,12 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Install OS dependencies if: steps.cache-c-core.outputs.cache-hit != 'true' || steps.cache-c-deps.outputs.cache-hit != 'true' # Only needed when building the C core or libomp run: - brew install ninja autoconf automake libtool cmake + brew install ninja autoconf automake libtool - name: Install OpenMP library if: steps.cache-c-deps.outputs.cache-hit != 'true' @@ -235,7 +235,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Cache installed C core id: cache-c-core @@ -305,7 +305,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Build sdist run: | diff --git a/README.md b/README.md index 6fb686d27..1f7162788 100644 --- a/README.md +++ b/README.md @@ -302,7 +302,7 @@ faster than the first one as the C core does not need to be recompiled. We aim to keep up with the development cycle of Python and support all official Python versions that have not reached their end of life yet. Currently this -means that we support Python 3.8 to 3.12, inclusive. Please refer to [this +means that we support Python 3.9 to 3.13, inclusive. Please refer to [this page](https://devguide.python.org/versions/) for the status of Python branches and let us know if you encounter problems with `igraph` on any of the non-EOL Python versions. diff --git a/setup.py b/setup.py index 1610a5f1d..40d386d24 100644 --- a/setup.py +++ b/setup.py @@ -7,8 +7,8 @@ ########################################################################### # Check Python's version info and exit early if it is too old -if sys.version_info < (3, 8): - print("This module requires Python >= 3.8") +if sys.version_info < (3, 9): + print("This module requires Python >= 3.9") sys.exit(0) ########################################################################### @@ -916,8 +916,6 @@ def get_tag(self): bdist_wheel_abi3 = None # We are going to build an abi3 wheel if we are at least on CPython 3.9. -# This is because the C code contains conditionals for CPython 3.8 so we cannot -# use an abi3 wheel built with CPython 3.8 on CPython 3.9 should_build_abi3_wheel = ( bdist_wheel_abi3 and platform.python_implementation() == "CPython" @@ -1039,7 +1037,7 @@ def get_tag(self): "pydoctor>=23.4.0", ], }, - "python_requires": ">=3.8", + "python_requires": ">=3.9", "headers": headers, "platforms": "ALL", "keywords": [ @@ -1057,7 +1055,6 @@ def get_tag(self): "Operating System :: OS Independent", "Programming Language :: C", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/src/_igraph/bfsiter.c b/src/_igraph/bfsiter.c index cf7cafdfe..e0c976245 100644 --- a/src/_igraph/bfsiter.c +++ b/src/_igraph/bfsiter.c @@ -121,10 +121,7 @@ static int igraphmodule_BFSIter_traverse(igraphmodule_BFSIterObject *self, visitproc visit, void *arg) { RC_TRAVERSE("BFSIter", self); Py_VISIT(self->gref); -#if PY_VERSION_HEX >= 0x03090000 - // This was not needed before Python 3.9 (Python issue 35810 and 40217) Py_VISIT(Py_TYPE(self)); -#endif return 0; } diff --git a/src/_igraph/dfsiter.c b/src/_igraph/dfsiter.c index 6064a9862..e8273173c 100644 --- a/src/_igraph/dfsiter.c +++ b/src/_igraph/dfsiter.c @@ -122,10 +122,7 @@ static int igraphmodule_DFSIter_traverse(igraphmodule_DFSIterObject *self, visitproc visit, void *arg) { RC_TRAVERSE("DFSIter", self); Py_VISIT(self->gref); -#if PY_VERSION_HEX >= 0x03090000 - // This was not needed before Python 3.9 (Python issue 35810 and 40217) Py_VISIT(Py_TYPE(self)); -#endif return 0; } diff --git a/src/_igraph/graphobject.c b/src/_igraph/graphobject.c index 9faabab39..95a29e5ff 100644 --- a/src/_igraph/graphobject.c +++ b/src/_igraph/graphobject.c @@ -141,10 +141,7 @@ int igraphmodule_Graph_traverse(igraphmodule_GraphObject * self, } } -#if PY_VERSION_HEX >= 0x03090000 - // This was not needed before Python 3.9 (Python issue 35810 and 40217) Py_VISIT(Py_TYPE(self)); -#endif return 0; }