Repository navigation
Drop support for Python 3.9 and 3.10 - #608
Merged
Merged
Conversation
Python 3.9 reached its end of life in October 2025, and Python 3.10 in October 2026. - require python>=3.11, remove 3.9 and 3.10 from ci, nox, the classifiers, the docs and the README compatibility table - run the minimum fsspec version tests on python 3.11 - remove python<3.11 code paths and backports in upath.core, upath.implementations.local, upath.registry and the tests - import Self, Unpack and TypeAlias from typing, typing_extensions isn't needed anymore to resolve the type hints at runtime - remove the vendored cpython 3.9 and 3.10 pathlib test suites - pyupgrade: target python 3.11 Closes fsspec#544
- functools.cache instead of lru_cache(maxsize=None) - X | Y instead of typing.Union and typing.Optional in the runtime type aliases of upath.types - collections.abc instead of typing for Callable, Iterator and Sequence in upath.types._abc - contextlib.chdir and datetime.UTC in the tests
Python 3.15 is part of the tests and typesafety matrices since fsspec#572, but mypy never ran on the upath package in CI, and the nox type-checking session only checked the sys.version_info branches of the Python version it runs on (3.13). So the code paths for Python 3.14 and 3.15 were never type checked. - nox: run mypy with --python-version for every supported version in the type-checking session - ci: add a type-checking job
ap--
marked this pull request as ready for review
December 5, 2026 22:19
This was referenced Dec 5, 2026
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.
Closes #544
Python 3.9 reached its end of life in October 2025, and Python 3.10 in October 2026. First PR of
the 0.4.0 series.
Drop support for Python 3.9 and 3.10
python>=3.11, and remove 3.9 and 3.10 from CI, nox, the classifiers, the docs and theREADME compatibility table
upath.core,upath.implementations.local,upath.registryand the testsSelf,UnpackandTypeAliasfromtyping.typing_extensionsisn't needed anymoreto resolve the type hints at runtime, and is dropped from the
devextraUse Python 3.11 standard library features
functools.cacheinstead oflru_cache(maxsize=None)X | Yinstead oftyping.Union/typing.Optionalin the runtime type aliases ofupath.typescollections.abcinstead oftypingforCallable,IteratorandSequenceinupath/types/_abc.pyicontextlib.chdiranddatetime.UTCin the testsType check the code for all supported Python versions
Python 3.15 is in the tests and typesafety matrices since #572, but mypy never ran on the
upathpackage in CI. The
type-checkingnox session only checked thesys.version_infobranches of thePython version it runs on (3.13), so the code paths for 3.14 and 3.15 were never type checked.
type-checkingsession runs mypy with--python-versionfor every supported versiontype-checkingjobI checked that a type error in the 3.15-only
LocalPath.is_reserved()passes the old session andfails the new one.
Python 3.15 audit
mkdir(parent_mode=...), the removal ofPurePath.is_reserved())are handled and tested since Support python 3.15 #572
on object stores
Follow-ups: vendoring the CPython pathlib test suites for 3.13, 3.14 and 3.15 (only 3.11 and 3.12
run against
PosixUPath/WindowsUPathtoday), and testing the free-threaded 3.15t build.Testing
nox -s tests-3.11 tests-3.14 tests-3.15 tests-minversion: all green, except the SMB suite,which can't bind port 445 on my machine
nox -s type-checking type-safety-3.11 type-safety-3.15 type-narrowing: mypy for 3.11 to 3.15,the typesafety cases and the pyright/ty narrowing checks pass
After merging: the conda-forge feedstock needs
python_min3.11 for the 0.4.0 release.