-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for 3.13 #3005
Merged
Merged
Fixes for 3.13 #3005
Changes from 7 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
c37f0cd
Try out naive KI protection fix
A5rocks 9c97949
Update generated files
A5rocks 3af42bb
Account for `._local` in full name
A5rocks e4fff1c
Add 3.13 to CI matrix
A5rocks c1c4b72
Avoid cryptography
A5rocks dc372df
Avoid an evil operation, I guess
A5rocks 7f64b79
un-inline ki protection decorator
richardsheridan 9a2fee4
Advertise 3.12 + maybe cryptography works?
A5rocks b1c304c
Switch back to avoiding cryptography
A5rocks f774b19
Try cryptography one more time
A5rocks e15bf6f
Add symbols
A5rocks dedaf21
Try one other possibility for symbols
A5rocks 460a1ce
More symbol trial and error
A5rocks b3f76b1
Try to pick up patterns in what allows what
A5rocks 7a67fb3
Test hypothesis
A5rocks a9410d8
Finish off failures
A5rocks f62e81e
Remove trailing whitespace
A5rocks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Back when we were making reference cycle tests, calling
locals()
when an exception was around would make a reference cycle for every exception (i.e. everyCancelled
) unless you did both del and removed it from thef_locals
dict. if the test is passing on all versions without it, though, no reason to keep it aroundThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test_cancel_scope_exit_doesnt_create_cyclic_garbage test fails on Fedora with Python 3.12 but passes with 3.13 :/
(However, we are stuck at 0.23.1, we are backporting this on top.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing
locals()
withsys._getframe().f_locals
also does the trick for both Python 3.12 and Python 3.13. The code is too magical for me to tell whether it's factually correct.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm: latest state of the PR fails tests on fedora with Python 3.12? (That's not a platform in CI so very possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused cause when I used Python 3.12.3 on Fedora (Docker, I built CPython 3.12.3 from source) and
pytest --pyargs trio --skip-optional-imports
on this PR, the tests pass. Am I missing something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said, we are stuck at 0.23.1, we are backporting this PR on top of it, so perhaps that makes a difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason you're stuck at 0.23.1? Looking at the changelog of 0.23.2 doesn't look like it should be introducing anything controversial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python-trio/trio-websocket#187 and possibly others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that should only be affected from 0.25.0 though. If you're at the point where you're cherrypicking commits you could instead revert cfc0755