Skip to content

Commit f6bef5d

Browse files
authored
Remove Python 3.9 support (#255)
1 parent 2b339ef commit f6bef5d

5 files changed

Lines changed: 18 additions & 21 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
- name: Set up Python
3030
uses: actions/setup-python@v4
3131
with:
32-
python-version: "3.12"
32+
python-version: "3.14"
3333
- name: Install black
3434
run: |
35-
pip install black==25.1.0
35+
pip install black==26.5.1
3636
- name: Run black
3737
run: |
3838
black --check --diff .
@@ -73,9 +73,9 @@ jobs:
7373
INSTALL_OPENCV: "true"
7474

7575
# MacOS env with OpenMP installed through homebrew
76-
- name: py39_conda_homebrew_libomp
76+
- name: py310_conda_homebrew_libomp
7777
os: macos-latest
78-
PYTHON_VERSION: "3.9"
78+
PYTHON_VERSION: "3.10"
7979
PACKAGER: "conda"
8080
BLAS: "openblas"
8181
CC_OUTER_LOOP: "clang"
@@ -101,16 +101,16 @@ jobs:
101101

102102
# Linux environments to test that packages that comes with Ubuntu 22.04
103103
# are correctly handled.
104-
- name: py39_ubuntu_atlas_gcc_gcc
104+
- name: py310_ubuntu_atlas_gcc_gcc
105105
os: ubuntu-22.04
106-
PYTHON_VERSION: "3.9"
106+
PYTHON_VERSION: "3.10"
107107
PACKAGER: "ubuntu"
108108
APT_BLAS: "libatlas3-base libatlas-base-dev"
109109
CC_OUTER_LOOP: "gcc"
110110
CC_INNER_LOOP: "gcc"
111-
- name: py39_ubuntu_openblas_gcc_gcc
111+
- name: py310_ubuntu_openblas_gcc_gcc
112112
os: ubuntu-22.04
113-
PYTHON_VERSION: "3.9"
113+
PYTHON_VERSION: "3.10"
114114
PACKAGER: "ubuntu"
115115
APT_BLAS: "libopenblas-base libopenblas-dev"
116116
CC_OUTER_LOOP: "gcc"
@@ -125,11 +125,11 @@ jobs:
125125
CC_INNER_LOOP: "gcc"
126126
INSTALL_OPENCV: "true"
127127

128-
# Linux + Python 3.9 and homogeneous runtime nesting.
129-
- name: py39_conda_openblas_clang_clang
128+
# Linux + Python 3.10 and homogeneous runtime nesting.
129+
- name: py310_conda_openblas_clang_clang
130130
os: ubuntu-latest
131131
PACKAGER: "conda"
132-
PYTHON_VERSION: "3.9"
132+
PYTHON_VERSION: "3.10"
133133
BLAS: "openblas"
134134
CC_OUTER_LOOP: "clang-18"
135135
CC_INNER_LOOP: "clang-18"

‎CHANGES.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
closures that can abort after ``os.fork()`` on some libffi builds.
6868
https://github.com/joblib/threadpoolctl/pull/242
6969

70+
- Dropped official support for Python 3.9.
71+
https://github.com/joblib/threadpoolctl/pull/255
72+
7073
3.6.0 (2025-03-13)
7174
==================
7275

‎pyproject.toml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ build-backend = "flit_core.buildapi"
66
name = "threadpoolctl"
77
authors = [{name = "Thomas Moreau", email = "thomas.moreau.2010@gmail.com"}]
88
readme = "README.md"
9-
requires-python = ">=3.9"
9+
requires-python = ">=3.10"
1010
license = "BSD-3-Clause"
1111
dynamic = ["version", "description"]
1212
classifiers = [
1313
"Intended Audience :: Developers",
1414
"Programming Language :: Python :: 3",
15-
"Programming Language :: Python :: 3.9",
1615
"Programming Language :: Python :: 3.10",
1716
"Programming Language :: Python :: 3.11",
1817
"Programming Language :: Python :: 3.12",
@@ -27,7 +26,7 @@ homepage = "https://github.com/joblib/threadpoolctl"
2726

2827
[tool.black]
2928
line-length = 88
30-
target_version = ['py39', 'py310', 'py311', 'py312', 'py313']
29+
target_version = ['py310', 'py311', 'py312', 'py313', 'py314']
3130
preview = true
3231

3332
[tool.ruff]

‎tests/test_threadpoolctl.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,9 +595,6 @@ def test_command_line_command_flag():
595595
assert lib_info in this_process_info
596596

597597

598-
@pytest.mark.skipif(
599-
sys.version_info < (3, 7), reason="need recent subprocess.run options"
600-
)
601598
def test_command_line_import_flag():
602599
result = subprocess.run(
603600
[

‎threadpoolctl.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,17 +1664,15 @@ def _warn_if_incompatible_openmp(self):
16641664
return
16651665

16661666
prefixes = [lib_controller.prefix for lib_controller in self.lib_controllers]
1667-
msg = textwrap.dedent(
1668-
"""
1667+
msg = textwrap.dedent("""
16691668
Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
16701669
the same time. Both libraries are known to be incompatible and this
16711670
can cause random crashes or deadlocks on Linux when loaded in the
16721671
same Python program.
16731672
Using threadpoolctl may cause crashes or deadlocks. For more
16741673
information and possible workarounds, please see
16751674
https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
1676-
"""
1677-
)
1675+
""")
16781676
if "libomp" in prefixes and "libiomp" in prefixes:
16791677
warnings.warn(msg, RuntimeWarning)
16801678

0 commit comments

Comments
 (0)