Skip to content

Drop Python 3.11 Support - #8153

Merged
blink1073 merged 2 commits into
scikit-image:mainfrom
blink1073:drop-python-3.11
May 9, 2026
Merged

blink1073 merged 2 commits into
scikit-image:mainfrom
blink1073:drop-python-3.11

Conversation

@blink1073

Copy link
Copy Markdown
Contributor

Drop Python 3.11 support

Python 3.11 has reached the end of its support window for this project. This PR removes all 3.11 CI jobs, test matrix entries, and wheel builds, and bumps the minimum required version to 3.12.

Changes

Configuration

  • pyproject.toml: bump requires-python to >=3.12, remove 3.11 classifier
  • INSTALL.rst: update documented minimum Python version to 3.12
  • asv.conf.json: update benchmark Python to 3.12

CI

  • test-linux.yaml: remove build-linux-311 / test-linux-311 jobs; move mini-req-eager-import and mini-req-optional-deps matrix variants into the 3.12 job
  • test-macos.yaml: replace 3.11 and 3.13 matrix entries with 3.12 and 3.14
  • test-windows.yaml: replace two 3.11 entries with 3.12
  • wheels-recipe.yaml: replace cp31{1,2}* with cp312* throughout

Code simplifications

  • src/_skimage2/_shared/_warnings.py: remove sys.version_info >= (3, 12) branch in warn_external; always use skip_file_prefixes (3.12+ only API)
  • tools/generate_requirements.py: replace try/except tomllib/tomli fallback with a direct import tomllib (standard since 3.11)

Licensing

  • LICENSE.txt: remove the warn_external function entry and the PSF-2.0 license section, which covered the now-deleted stack-walking code

AI Usage

This PR was developed with the assistance of Claude Code (claude-sonnet-4-6).
I (@blink1073) have thoroughly reviewed the changes.

@blink1073 blink1073 added 🔧 type: Maintenance Refactoring and maintenance of internals 🤖 type: Infrastructure CI, packaging, tools and automation 📦 Installation labels May 8, 2026
@greptile-apps

greptile-apps Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "clean up python versions in workflows" | Re-trigger Greptile

@stefanv

stefanv commented May 8, 2026 •

Copy link
Copy Markdown
Member

Thanks for trying out our new AI policy :)

Closes #8149

@stefanv stefanv 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, LGTM.

# Go to Python's `site-packages` or `lib` from an editable install.
basedir = Path(__file__).parents[2]
kwargs['skip_file_prefixes'] = (
# Go to Python's `site-packages` or `lib` from an editable install.

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.

Which of the two is it?

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.

I'm not sure, the docs on skip_file_prefixes don't specify. The comment was in the previous code.

@blink1073
blink1073 merged commit f0eb085 into scikit-image:main May 9, 2026
59 of 60 checks passed
@blink1073
blink1073 deleted the drop-python-3.11 branch May 9, 2026 13:48
@stefanv stefanv added this to the 0.27 milestone May 9, 2026
matthew-brett added a commit that referenced this pull request May 12, 2026
* origin/main: (85 commits)
  Drop Python 3.11 Support (#8153)
  undo change to benchmark workflow
  address review
  Update pyodide CI test to match the pattern used by numpy (#8140)
  Update .github/workflows/_build_linux_for_python_x.yaml
  Update .github/workflows/_test_linux_for_python_x.yaml
  Suppress tifffile DeprecationWarning in test_plugin_deprecation_on_imread (#8138)
  fix yaml
  fix yaml
  Update .github/workflows/test-linux.yaml
  Update .github/workflows/_test_linux_for_python_x.yaml
  Update .github/workflows/test-linux.yaml
  Update .github/workflows/test-linux.yaml
  Move tests back to doc build
  Fill out .PHONY targets
  Apply suggestions from code review
  Remove unused imports (apply commit hooks)
  Improve inserted docstring note of `deprecated_func` (#8095)
  address review
  Update doc/source/index.rst
  ...
matthew-brett added a commit to matthew-brett/scikit-image that referenced this pull request May 21, 2026
* origin/main: (254 commits)
  Refactor, document migration utilities (scikit-image#8184)
  ci: improve handling of pr labels (scikit-image#8169)
  Doctest migration in PRs & on all platforms (scikit-image#8141)
  Update SKIP 4 (import hierarchy, backporting, testing) (scikit-image#8097)
  One page per function / class in HTML docs for skimage2 (scikit-image#8154)
  Pin minimum pytest to 9 (scikit-image#8174)
  docs: make source install instructions more discoverable and add build requirements to top level requirements file (scikit-image#8165)
  Drop `--maxfail=5` from local pytest config (scikit-image#8170)
  Use standard C99 static inline instead of `__inline` (scikit-image#8159)
  Fix structural_similarity win_size / gaussian_weights conflict (scikit-image#8162)
  Unwrap seed refactor (scikit-image#8142)
  ci: Remove llvm build and add ccache support on windows (scikit-image#8164)
  Document warn_external in contributing guide (scikit-image#8163)
  CI: Fix emscripten dependencies and clean up wheel test commands (scikit-image#8147)
  Test only changed subpackages (scikit-image#8103)
  Fix nightlies: update deprecated scipy call, fix underdetermined test
  Fix minkowski distanced invocation for SciPy >= 1.18 (scikit-image#8157)
  Port `structural_similarly` to ski2 (scikit-image#8104)
  make spin build requirement a lower bound (scikit-image#8158)
  Drop Python 3.11 Support (scikit-image#8153)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 Installation 🤖 type: Infrastructure CI, packaging, tools and automation 🔧 type: Maintenance Refactoring and maintenance of internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants