Repository navigation
Conversation
Run the test suite on CPython 3.15t with nox (tests-3.15t) and add it as an ubuntu-latest job to the test matrix. Free-threaded pythons are listed separately in FREE_THREADED_PYTHONS, so that the type-safety sessions and the mypy target versions only use SUPPORTED_PYTHONS. Environment markers can't distinguish free-threaded builds, so the tests session excludes test dependencies without free-threaded wheels from the resolution with uv's --excludes: - gcsfs imports grpcio, which has no cp315t wheels and is too slow to build, so the gcs tests are skipped. The docker_gcs fixture now skips without gcsfs, instead of failing test_mkdir_in_empty_bucket. - hf-xet has no cp315t wheels and needs a recent Rust to build. huggingface_hub works without it and the hf tests still run. PyNaCl (required by paramiko) has no cp315t wheels either, but builds from source with its bundled libsodium. No extension module re-enables the GIL during the test run. Concurrent first lookups of a protocol without a UPath implementation created a separate fallback class per thread, so paths created in different threads couldn't be pickled and relative_to() rejected them. All lookups now return the class registered in the _experimental module.
ap--
force-pushed
the
ci-free-threaded-3.15t
branch
from
December 5, 2026 22:34
8b45ed7 to
9f65998
Compare
This branch has not been deployed
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.
Follow-up to #608.
Runs the test suite on free-threaded CPython 3.15 (
3.15t):nox -s tests-3.15t, plus one more ubuntu-latest entry in the CI test matrix.nox
FREE_THREADED_PYTHONS = ["3.15t"]only extends thetestssession. type-safety and type-checking keep usingSUPPORTED_PYTHONS, since free-threaded builds type check like the regular build of the same version.cp315twheels via uv's--excludes:docker_gcsfixture now skips without gcsfs, becausetest_mkdir_in_empty_bucketused to fail instead of skipping.cp315twheels either, but builds from source with its bundled libsodium.Results (Linux, without the SMB suite, which can't bind port 445 on my machine)
PYTHON_GIL=0The additional skips are the gcs tests. The additional xfails with
PYTHON_GIL=0are GitHub tests that hit the API rate limit. No extension module re-enables the GIL during the test run. I'm not adding theFree Threadingtrove classifier yet, because of the known registry race below.Thread-safety fix
Concurrent first lookups of a protocol that fsspec knows but UPath doesn't implement (
get_upath_class()creating the fallback class) created a separate class per thread. Paths created in different threads then failed to pickle (99 of 100 trials on 3.15t, 1 of 100 with the GIL), andrelative_to()rejected them. All lookups now return the class registered inupath.implementations._experimental.test_get_upath_class_without_implementation_threadedfails on 3.15t without the fix.Reviewed, but left as is:
_FSSPEC_HAS_WORKING_GLOB,_LISTDIR_WORKS_ON_FILESand_get_implementation_protocols()are idempotent lazy initializations.WrappedFileSystemFlavour.from_protocol()can return two equal flavour instances during the first concurrent lookup. That's harmless in practice: only</>compare flavour identity, and the reflected comparison covers it.Known, not fixed here:
register_implementation(..., clobber=True)clears the lookup cache before it writes the new entry, so a concurrent lookup can cache the old class. Fixing this needs a lock.get_upath_class()keeps returningNone.Docs
docs/contributing.md: how to runnox -s tests-3.15t, and which dependencies are left out.Not verified