From b6a326b05a7ddb9351048ae5c576a40a64d87f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dea=20Mar=C3=ADa=20L=C3=A9on?= Date: Mon, 21 Sep 2026 17:11:39 +0200 Subject: [PATCH 1/5] Remove Python 3.9 --- .github/workflows/test.yml | 22 +++++++++++----------- CHANGES.md | 3 +++ pyproject.toml | 5 ++--- tests/test_threadpoolctl.py | 3 --- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0f55b6a..4fe43308 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,15 +63,15 @@ jobs: PYTHON_VERSION: "3.10" PACKAGER: "conda" # Windows env with numpy, scipy installed through pip - - name: py39_pip + - name: py310_pip os: windows-latest - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.10" PACKAGER: "pip" # MacOS env with OpenMP installed through homebrew - - name: py39_conda_homebrew_libomp + - name: py310_conda_homebrew_libomp os: macos-latest - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.10" PACKAGER: "conda" BLAS: "openblas" CC_OUTER_LOOP: "clang" @@ -93,16 +93,16 @@ jobs: # Linux environments to test that packages that comes with Ubuntu 22.04 # are correctly handled. - - name: py39_ubuntu_atlas_gcc_gcc + - name: py310_ubuntu_atlas_gcc_gcc os: ubuntu-22.04 - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.10" PACKAGER: "ubuntu" APT_BLAS: "libatlas3-base libatlas-base-dev" CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - - name: py39_ubuntu_openblas_gcc_gcc + - name: py310_ubuntu_openblas_gcc_gcc os: ubuntu-22.04 - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.10" PACKAGER: "ubuntu" APT_BLAS: "libopenblas-base libopenblas-dev" CC_OUTER_LOOP: "gcc" @@ -115,11 +115,11 @@ jobs: PYTHON_VERSION: "*" CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - # Linux + Python 3.9 and homogeneous runtime nesting. - - name: py39_conda_openblas_clang_clang + # Linux + Python 3.10 and homogeneous runtime nesting. + - name: py310_conda_openblas_clang_clang os: ubuntu-latest PACKAGER: "conda" - PYTHON_VERSION: "3.9" + PYTHON_VERSION: "3.10" BLAS: "openblas" CC_OUTER_LOOP: "clang-18" CC_INNER_LOOP: "clang-18" diff --git a/CHANGES.md b/CHANGES.md index f771fa40..5f788327 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -41,6 +41,9 @@ - On Linux, start using /proc/self/maps for listing shared libraries. +- Dropped official support for Python 3.9. + https://github.com/joblib/threadpoolctl/pull/XXX + 3.6.0 (2025-03-13) ================== diff --git a/pyproject.toml b/pyproject.toml index e2a35c6a..32c33816 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,13 +6,12 @@ build-backend = "flit_core.buildapi" name = "threadpoolctl" authors = [{name = "Thomas Moreau", email = "thomas.moreau.2010@gmail.com"}] readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" license = "BSD-3-Clause" dynamic = ["version", "description"] classifiers = [ "Intended Audience :: Developers", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -25,7 +24,7 @@ homepage = "https://github.com/joblib/threadpoolctl" [tool.black] line-length = 88 -target_version = ['py39', 'py310', 'py311', 'py312', 'py313'] +target_version = ['py310', 'py311', 'py312', 'py313'] preview = true [tool.ruff] diff --git a/tests/test_threadpoolctl.py b/tests/test_threadpoolctl.py index a5466e59..1fc0634c 100644 --- a/tests/test_threadpoolctl.py +++ b/tests/test_threadpoolctl.py @@ -581,9 +581,6 @@ def test_command_line_command_flag(): assert lib_info in this_process_info -@pytest.mark.skipif( - sys.version_info < (3, 7), reason="need recent subprocess.run options" -) def test_command_line_import_flag(): result = subprocess.run( [ From 6f3f5e6541de642c6be76a3e484efb7d39662a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dea=20Mar=C3=ADa=20L=C3=A9on?= Date: Tue, 22 Sep 2026 09:22:54 +0200 Subject: [PATCH 2/5] Added py14 and 15 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 504afc4b..68add54d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ homepage = "https://github.com/joblib/threadpoolctl" [tool.black] line-length = 88 -target_version = ['py310', 'py311', 'py312', 'py313'] +target_version = ['py310', 'py311', 'py312', 'py313', 'py314', 'py315'] preview = true [tool.ruff] From 7da2e031c5d9b0f43c8f4a7701ccf06ca044fae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dea=20Mar=C3=ADa=20L=C3=A9on?= Date: Tue, 22 Sep 2026 09:24:48 +0200 Subject: [PATCH 3/5] Try black without pinned version --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc0a5088..696e3a8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ jobs: python-version: "3.12" - name: Install black run: | - pip install black==25.1.0 + pip install black - name: Run black run: | black --check --diff . From b3a4f3d2d1a030d4c6f11c0e5c762836530a8f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dea=20Mar=C3=ADa=20L=C3=A9on?= Date: Tue, 22 Sep 2026 09:54:54 +0200 Subject: [PATCH 4/5] pin black ver 26_5_1 --- .github/workflows/test.yml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 696e3a8e..104e18a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,10 +29,10 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.12" + python-version: "3.14" - name: Install black run: | - pip install black + pip install black==26.5.1 - name: Run black run: | black --check --diff . diff --git a/pyproject.toml b/pyproject.toml index 68add54d..815cd334 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ homepage = "https://github.com/joblib/threadpoolctl" [tool.black] line-length = 88 -target_version = ['py310', 'py311', 'py312', 'py313', 'py314', 'py315'] +target_version = ['py310', 'py311', 'py312', 'py313', 'py314'] preview = true [tool.ruff] From fa94741c591c59c7dad9a8008c60bedc076887dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dea=20Mar=C3=ADa=20L=C3=A9on?= Date: Tue, 22 Sep 2026 10:14:14 +0200 Subject: [PATCH 5/5] Fixed black issue --- threadpoolctl.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/threadpoolctl.py b/threadpoolctl.py index 177bb244..8e8268ed 100644 --- a/threadpoolctl.py +++ b/threadpoolctl.py @@ -1664,8 +1664,7 @@ def _warn_if_incompatible_openmp(self): return prefixes = [lib_controller.prefix for lib_controller in self.lib_controllers] - msg = textwrap.dedent( - """ + msg = textwrap.dedent(""" Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at the same time. Both libraries are known to be incompatible and this can cause random crashes or deadlocks on Linux when loaded in the @@ -1673,8 +1672,7 @@ def _warn_if_incompatible_openmp(self): Using threadpoolctl may cause crashes or deadlocks. For more information and possible workarounds, please see https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md - """ - ) + """) if "libomp" in prefixes and "libiomp" in prefixes: warnings.warn(msg, RuntimeWarning)