Skip to content

drop support for Python 3.8#6128

Open
alex wants to merge 1 commit into
PyO3:mainfrom
alex:drop-python-3.8
Open

drop support for Python 3.8#6128
alex wants to merge 1 commit into
PyO3:mainfrom
alex:drop-python-3.8

Conversation

@alex

@alex alex commented Jun 11, 2026

Copy link
Copy Markdown
Member

Fixes #4581.

Drops support for Python 3.8, which reached end-of-life in October 2024. Follows the same approach as the Python 3.7 drop in #5912.

  • Bumps the minimum supported CPython version to 3.9 (pyo3-build-config, pyo3-ffi build script and package metadata).
  • Removes the abi3-py38 feature; abi3-py39 is now the lowest stable-ABI target.
  • Removes Py_3_9 cfg gates (now always true) and deletes code that only existed for 3.8, including:
    • the backports.zoneinfo fallback in PyTzInfo::timezone (and the corresponding CI install step)
    • the pre-3.9 buffer-protocol / tp_dictoffset / tp_weaklistoffset fixups in create_type_object.rs
    • the assert_dict_supported / assert_weakref_supported compile-time assertions and their abi3_dict / abi3_weakref UI tests, since dict and weakref are always available from abi3-py39
    • dead FFI items (PyCFunction_New/NewEx externs, Py*_ClearFreeList, PyImport_Cleanup, tp_print, pre-3.9 PyObject_IS_GC / PyObject_CheckBuffer fallbacks, etc.)
  • Updates CI matrices, noxfile (abi3 forward-compat tests now use abi3-py39), requires-python in the various pyproject.tomls, and documentation.

🤖 Generated with Claude Code

Follows the same approach as the Python 3.7 drop (PyO3#5912):

- bump minimum supported CPython version to 3.9
- remove the abi3-py38 feature; abi3-py39 is now the lowest
- remove Py_3_9 cfg gates (now always true) and code that only
  existed for 3.8, including the backports.zoneinfo fallback and
  the pre-3.9 buffer protocol / dict / weakref workarounds
- update CI matrices, noxfile, packaging metadata, and docs

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

Drop support for Python 3.8

1 participant