diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b086d751..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==25.1.0 + pip install black==26.5.1 - name: Run black run: | black --check --diff . @@ -73,9 +73,9 @@ jobs: INSTALL_OPENCV: "true" # 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" @@ -101,16 +101,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" @@ -125,11 +125,11 @@ jobs: CC_INNER_LOOP: "gcc" INSTALL_OPENCV: "true" - # 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 d7a4bb27..0e643c66 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -67,6 +67,9 @@ closures that can abort after ``os.fork()`` on some libffi builds. https://github.com/joblib/threadpoolctl/pull/242 +- Dropped official support for Python 3.9. + https://github.com/joblib/threadpoolctl/pull/255 + 3.6.0 (2025-03-13) ================== diff --git a/pyproject.toml b/pyproject.toml index f2ff8a65..815cd334 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", @@ -27,7 +26,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', 'py314'] preview = true [tool.ruff] diff --git a/tests/test_threadpoolctl.py b/tests/test_threadpoolctl.py index 75a6ac9a..076a33fc 100644 --- a/tests/test_threadpoolctl.py +++ b/tests/test_threadpoolctl.py @@ -595,9 +595,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( [ 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)