Update Makefile to easily switch between Python versions#562
Merged
Conversation
Collaborator
|
Nice simplification! And wow, |
tombh
approved these changes
Jun 29, 2025
Collaborator
Author
|
Thanks! |
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.
Description (e.g. "Related to ...", etc.)
Building on #561, now that we're using
uvdirectly for everything we're not only able to simply the Makefile greatly, but it's now trivial to switch between Python versions.By default, the Makefile will use 3.13
But by setting the
PYvariable when running make, you easily test against a different version, say 3.9And since
uvsupports it, it's now trivial to start playing around with runningpyglswith a free-threaded Python build!For the most part, free-threaded Python appears to "just work", however, it's probably not quite ready to add to CI as there is at least one websocket test that hangs the test suite. I'm also not sure if enough of our test suite really exercises threading all that much?...
Thanks to this code snippet I have updated the pytest header to indicate if the test suite is running with or without the GIL.
Finally, I came across this article the other day and thought it was a great idea, so using it as a guide I've tweaked the test suite so that all of our slow (i.e. end-to-end) tests now run last.
Code review checklist (for code reviewer to complete)
Automated linters
You can run the lints that are run on CI locally with: