Skip to content

Add Python 3.13, 3.14, and free threaded 3.14t to the testing#55

Merged
cclauss merged 5 commits intomasterfrom
test-on-modern-Python
Mar 5, 2026
Merged

Add Python 3.13, 3.14, and free threaded 3.14t to the testing#55
cclauss merged 5 commits intomasterfrom
test-on-modern-Python

Conversation

@cclauss
Copy link
Contributor

@cclauss cclauss commented Mar 5, 2026

Updated Python versions in CI workflow and upgraded actions.
@cclauss cclauss closed this Mar 5, 2026
@cclauss cclauss reopened this Mar 5, 2026
@agronholm
Copy link
Contributor

Is there any point in testing against 3.14t?

@cclauss
Copy link
Contributor Author

cclauss commented Mar 5, 2026

Does anyone have the permissions to remove Required from the Python 3.7 tests?
image

Also, 3.8 and 3.9, which are also end of life?

On Python 3.14t if the free threading tests pass, then what is the harm?

@agronholm
Copy link
Contributor

Does anyone have the permissions to remove Required from the Python 3.7 tests?
Also, 3.8 and 3.9, which are also end of life?

I should have the permissions to do that. I'm not sure where these are coming from though – I haven't worked much with Trio's CI.

On Python 3.14t if the free threading tests pass, then what is the harm?

The extra CI jobs aren't free in terms of computing capacity, and may delay other jobs from being started. I'd be willing to include 3.14t only if there's demonstrable benefit from doing so, but the nature of sniffio is such that free-threading doesn't really come into play.

@agronholm
Copy link
Contributor

Correction: I don't seem to have the administrative privileges to turn off the required jobs.

@agronholm
Copy link
Contributor

@A5rocks ping – retiring the old jobs is indeed in order.

@agronholm
Copy link
Contributor

https://github.com/python-trio/sniffio/settings/rules/new?target=branch --> Require status checks to pass

This gives me a 404.

@cclauss
Copy link
Contributor Author

cclauss commented Mar 5, 2026

Given:

I think that testing on free-threaded Python would be appropriate (it passes) but I have removed it for now.

@agronholm
Copy link
Contributor

Actually, given that it uses thread-locals, testing against 3.14t could be justified. So, feel free to add it back.

@x42005e1f
Copy link

Actually, given that it uses thread-locals, testing against 3.14t could be justified. So, feel free to add it back.

But is this not already covered by CPython tests? And I do not see any use of threads in the sniffio tests.

@agronholm
Copy link
Contributor

Actually, given that it uses thread-locals, testing against 3.14t could be justified. So, feel free to add it back.

But is this not already covered by CPython tests? And I do not see any use of threads in the sniffio tests.

CPython tests, as opposed to what? And I don't know about tests but sniffio does in fact use thread-locals, so 3.14t is borderline justifiable to test against.

@cclauss
Copy link
Contributor Author

cclauss commented Mar 5, 2026

Can this be merged, or do those Required tags next to the Python 3.7 tests block merging?

@agronholm
Copy link
Contributor

Can this be merged, or do those Required tags next to the Python 3.7 tests block merging?

image

@x42005e1f
Copy link

CPython tests, as opposed to what?

sniffio uses instances of the threading.local subclass. What is the purpose of testing them if the expected behavior is ensured by CPython tests?

@nicoddemus nicoddemus removed their request for review March 5, 2026 15:22
@agronholm
Copy link
Contributor

CPython tests, as opposed to what?

sniffio uses instances of the threading.local subclass. What is the purpose of testing them if the expected behavior is ensured by CPython tests?

We're not testing that threading.local() works, we're testing that nothing goes wrong with the way sniffio interacts with it.

@cclauss
Copy link
Contributor Author

cclauss commented Mar 5, 2026

The current code uses the threading module. How do we guarantee that future changes will not use that module in ways that cause breakage on a free-threaded version of Python?

I would be happy to drop Python 3.14 (and 3.8, 3.9) and keep 3.14t as the safest path, which reduces the number of CI test runs.

@agronholm
Copy link
Contributor

I would be happy to drop Python 3.14 (and 3.8, 3.9) and keep 3.14t as the safest path, which reduces the number of CI test runs.

I'd like other maintainers to share their opinions on that.

@A5rocks
Copy link
Contributor

A5rocks commented Mar 5, 2026

Does anyone have the permissions to remove Required from the Python 3.7 tests? image

Done. I've kept 3.8 and 3.9 for now since they still work, but if anyone does the obvious followup and switches CI to use https://github.com/re-actors/alls-green (which we use in Trio for exactly this reason) I'll remove the others.

@cclauss cclauss merged commit e4a54cf into master Mar 5, 2026
51 checks passed
@cclauss cclauss deleted the test-on-modern-Python branch March 5, 2026 16:57
python-version: ${{ matrix.python }}
cache: pip
cache-dependency-path: test-requirements.txt
- name: Setup python (dev)
Copy link
Contributor

Choose a reason for hiding this comment

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

Another potential followup: setup-python supports -dev versions now, so this step can be removed.

(CI is sisyphean...)

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you intend to also get rid of those non-standard requirements files in favor of dependency groups? I'd be happy to send a PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would be fine with that, yeah. (I hadn't exactly intended that since I had thought we were using pip-compile! But we're not, so...)

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.

4 participants