Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MNT remove python 3.9 from CI - #1773

Merged
lesteve merged 18 commits into
joblib:mainfrom
Nanored4498:Remove-Python-3.9-from-the-CI
Aug 4, 2026
Merged

MNT remove python 3.9 from CI#1773
lesteve merged 18 commits into
joblib:mainfrom
Nanored4498:Remove-Python-3.9-from-the-CI

Conversation

@Nanored4498

@Nanored4498 Nanored4498 commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

Removing Python 3.9 from CI.
In cloudpickle.py _code_reduce function, there is some code for python 3.9 or older. Should we remove it?

Closes #1766

@codecov

codecov Bot commented Jan 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.99%. Comparing base (53cea7b) to head (c2c6e09).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1773      +/-   ##
==========================================
- Coverage   94.13%   93.99%   -0.14%     
==========================================
  Files          46       46              
  Lines        7979     7979              
==========================================
- Hits         7511     7500      -11     
- Misses        468      479      +11     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lesteve lesteve left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, some comments.

Comment thread .github/workflows/test.yml
Comment thread .github/workflows/test.yml
@lesteve

lesteve commented Jan 14, 2026

Copy link
Copy Markdown
Member

In cloudpickle.py _code_reduce function, there is some code for python 3.9 or older. Should we remove it?

I think ignore this one for now, code in joblib/externals is "vendored" (i.e. copied and pasted from upstream project). For cloudpickle this is https://github.com/cloudpickle/cloudpickle. In general, we don't update code in joblib/externals manually, we only update the version that we vendor.

Also cloudpickle will be unvendored soonish #1753.

@Nanored4498

Copy link
Copy Markdown
Contributor Author

With distributed==2022.4.2 a test failed because when a Client is closed, it closes its loop. The behavior changed later and starting from distributed==2022.8.1, the Client no longer closes the loop.
I guess we do not care about either this test should passed for these older versions of distributed so I changed the version to 2022.8.1.

@tomMoral tomMoral left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nice!

To finish this, we need:

  • add an entry in the changelog
  • Maybe add in doc our strategy for supporting the libraries (numpy, distributed). Also write somewhere the current oldest supported version.
  • add in doc/developping.rst some info on how to update these tests so we have a consistent way to do this (we need to do this every year).

@tomMoral tomMoral changed the title remove python 3.9 from CI MNT remove python 3.9 from CI Jan 30, 2026
Comment thread README.rst Outdated

@tomMoral tomMoral left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first batch of comments

Comment thread CHANGES.rst Outdated
Comment thread pyproject.toml
Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml Outdated
name: [default]
os: [ubuntu-latest, macos-latest, windows-latest]
PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
PYTHON_VERSION: ["OLD", "3.11", "3.12", "3.13", "3.14"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PYTHON_VERSION: ["OLD", "3.11", "3.12", "3.13", "3.14"]
PYTHON_VERSION: ["3.10", "3.11", "3.12", "3.13", "3.14"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this one explicit as this tests the range with the latest installable libraries

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit 98dcb90, I put both "oldest_supported" and "3.10" in order to test the oldest python version with both oldest and latest versions of numpy and cloudpickle.

Comment thread .github/workflows/test.yml Outdated
Comment thread continuous_integration/install.sh Outdated
elif [[ $PYTHON_VERSION == "OLD" ]]; then
PYTHON_VERSION=$PYTHON_OLD_VERSION
CLOUDPICKLE="cloudpickle==$CLOUDPICKLE_OLD_VERSION"
NUMPY="numpy==$NUMPY_OLD_VERSION"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we want to also try oldest python with latest numpy supported for this version (which is for new install).
So not sure I like this coupling here. I think I prefered the explicit extra_conda_packages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With commit 98dcb90, we now test oldest python with both oldest versions and latest version of numpy.
The goal was to make easier the change of supported versions by just modifying values at one place (the environment variables in test.yml).
Does it look better to you now?

@lesteve lesteve left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good enough for me, let's merge this one!

@lesteve
lesteve merged commit fa4d5af into joblib:main Aug 4, 2026
93 of 94 checks passed
@Nanored4498
Nanored4498 deleted the Remove-Python-3.9-from-the-CI branch August 4, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Python 3.9 from the CI

4 participants