Repository navigation
Drop support for Python 3.8 and 3.9 (require Python 3.10+) - #77
Merged
Merged
Conversation
Python 3.8 and 3.9 are end of life, so MkDocs now requires Python 3.10+. - Set requires-python to >=3.10 and drop the 3.8/3.9 trove classifiers. - Remove the conditional importlib-metadata dependency (stdlib importlib.metadata is used directly on 3.10+). - Remove the _removesuffix and insort compatibility shims; stdlib str.removesuffix and bisect.insort(key=...) are used directly. - Drop 3.8/3.9 from the CI smoke/full test matrices and the hatch test and integration env matrices. - Simplify tests that had Python-version-specific branches. - Apply pyupgrade fixes enabled by the raised floor (list/dict generics, collections.abc imports, functools.cache, zip strict parameter, parenthesized context managers, X | None annotations).
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #33: drop support for Python 3.8 and 3.9 (both end of life) — MkDocs now requires Python 3.10+.
What changed
pyproject.toml:requires-python = ">=3.10", removed the 3.8/3.9 trove classifiers, dropped the conditionalimportlib-metadatadependency (stdlibimportlib.metadataused directly), removed 3.8/3.9 from the hatch test and integration env matrices.github/workflows/ci.yml: removed 3.8 from the smoke test matrix and 3.8/3.9 from the full test matriximportlib_metadatafallbacks inplugins.py/utils/__init__.py_removesuffixshim (now usesstr.removesuffixdirectly)insortfallback (stdlibbisect.insort(key=...)is used; kept as a re-export forutils.insortusers)list[T]/dict[str, T]generics,collections.abcimports (moved intoTYPE_CHECKINGblocks where annotation-only),functools.cache,zip(..., strict=False), parenthesized context managers,X | NoneannotationsVerification
uvx prek run -apasses (ruff, mypy, markdownlint, jshint, ...)uv buildwheel metadata:Requires-Python: >=3.10, noimportlib-metadatain dependenciesNotes
This is a breaking change (hence the
breakinglabel on #33) and is planned for the 1.8.0 release. Users on Python 3.8/3.9 should stay on the 1.7.x line.