Skip to content

feat: Add Python 3.13t and 3.14t builds / wheels#619

Merged
kylebarron merged 12 commits intodevelopmentseed:mainfrom
DisturbedOcean:py314t
Mar 6, 2026
Merged

feat: Add Python 3.13t and 3.14t builds / wheels#619
kylebarron merged 12 commits intodevelopmentseed:mainfrom
DisturbedOcean:py314t

Conversation

@DisturbedOcean
Copy link
Contributor

No description provided.

@kylebarron
Copy link
Member

It would be great to update to pyo3 0.28, but that should be a separate PR from adding free-threaded wheels

@kylebarron
Copy link
Member

I think updating to pyo3 0.28 should be simpler; let's do that first and follow up with the free-threaded support

@DisturbedOcean DisturbedOcean changed the title feat: Update to pyo3 0.28 + build for Python 3.13t & 3.14t feat: Add Python 3.13t and 3.14t builds / wheels Feb 20, 2026
@kylebarron
Copy link
Member

kylebarron commented Feb 20, 2026

Thanks for the PR. I think we want a few other elements from kylebarron/arro3#275

pyproject.toml Outdated

[tool.pytest.ini_options]
addopts = "-v --mypy-only-local-stub"
addopts = "-v --mypy-only-local-stub --threads=1 --iterations=1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we explicitly don't want to set --threads=1, because then we're not testing whether the free-threading build actually works.

Why did you set --threads=1? Did you hit an error with it unset?

@DisturbedOcean
Copy link
Contributor Author

Given c58dd01 - what should I change this PR to have?

@kylebarron
Copy link
Member

kylebarron commented Feb 23, 2026

The gist of this PR still stands. You're still adding 3.13t and 3.14t to the version-specific wheel matrix. So e.g. you'd add it on this line:

args: --release --out dist -i 3.10 -i pypy3.11 --manifest-path obstore/Cargo.toml

I don't think the diff should be too complex

I needed #623 as the cleanest way to fix #622

@kylebarron
Copy link
Member

@DisturbedOcean it looks like you're pretty close here; are you planning to work on this PR more?

@DisturbedOcean
Copy link
Contributor Author

I'm pretty buried with work and life right now, not sure when I can find time to finish this up quite yet.

If someone else does, by all means.

@kylebarron
Copy link
Member

I think we need to:

  • Switch to pytest-run-parallel (pytest-freethreaded was deprecated)
  • Update pyproject.toml to limit dev dependencies. Right now we have a big blob of dev-dependencies for convenience, but some of these don't have wheels provided for 3.14t, and CI takes forever trying to build them from scratch.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for building/testing against free-threaded CPython (“t” builds) by extending CI workflows, adjusting project dependencies, and updating tests/fixtures to be more robust under different runtime behaviors.

Changes:

  • Add 3.13t/3.14t to wheel build targets and adjust Python test workflow to handle free-threaded runs.
  • Add pytest-freethreaded (guarded for Python ≥3.13) and configure pytest to avoid unintended threaded execution on GIL-enabled builds.
  • Make S3/minio-backed tests more order/cleanup resilient and reduce reliance on pytest’s tmp_path fixture in some tests.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Updates lock resolution markers and adds pytest-freethreaded/pyzmq plus version bumps to support new Python targets.
pyproject.toml Updates dev dependencies and registers a freethreaded pytest marker.
tests/conftest.py Adds pytest configuration to control pytest-freethreaded behavior and ensures the MinIO bucket is cleaned before tests.
tests/test_fsspec.py Makes list assertions order-independent and uses TemporaryDirectory for local-file upload tests.
tests/store/test_local.py Switches several tests to use TemporaryDirectory instead of tmp_path.
obstore/src/lib.rs Marks the PyO3 module as gil_used = false for free-threaded compatibility.
.github/workflows/wheels.yml Extends wheel builds to include 3.13t/3.14t.
.github/workflows/test-python.yml Splits test execution for “t” builds to run with --require-gil-disabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kylebarron
Copy link
Member

I'm testing a wheel build in https://github.com/developmentseed/obstore/actions/runs/22688677302

@kylebarron
Copy link
Member

Ok well wheel building succeeded; it's just a remaining issue with the pytest-freethreaded -> pytest-run-parallel conversion

@kylebarron
Copy link
Member

This looks great; thank you for your help!

@kylebarron kylebarron merged commit 2be0c5e into developmentseed:main Mar 6, 2026
9 checks passed
@DisturbedOcean
Copy link
Contributor Author

No problem! Any chance for a new release soon?

@kylebarron
Copy link
Member

I pushed a new release in #640

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants