-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Test against 3.10 beta #1921
Test against 3.10 beta #1921
Conversation
This is a requirement to achieve Python 3.10 compatibility.
Codecov Report
@@ Coverage Diff @@
## master #1921 +/- ##
=======================================
Coverage 99.56% 99.56%
=======================================
Files 114 114
Lines 14618 14634 +16
Branches 1117 1118 +1
=======================================
+ Hits 14554 14570 +16
Misses 43 43
Partials 21 21
|
In CPython 3.10.0a5 TracebackException.__init__() started to care about the difference between _seen=set() and _seen=None. As such we need to avoid turning None into set() prior to passing it to the real .__init__(). python/cpython@6dfd173
I'm not really sure why |
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.
One question but it's not really important, I'm just curious. Feel free to merge when you're happy.
threading.excepthook, prev = threading.__excepthook__, threading.excepthook | ||
else: | ||
threading.excepthook, prev = _noop, threading.excepthook | ||
|
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.
This is mysterious :-). What's going on here?
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 think this was for disabling the thread hooks that pytest started using in 6.2 or so to catch and complain about uncaught exceptions in threads. In certain cases, IIRC, we literally have explanations in the code, or even the error messages, saying that yes, these will fall out un-handled in the thread or whatever but that that's the way it is and we know. But @graingert did this bit. The added bit here is to use the 'original' excepthook instead of a noop when it is available (in 3.10). This additional feature in 3.10 let's this code be more consistent with the restore_unraisablehook()
above.
Hopefully that's in the direction you were wondering about...
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.
LGTM. I don't fully understand the logic in the CI workflow where the Python version is selected, so hopefully someone else can review that :)
@agronholm, yeah, coding |
Draft for:
compact=
keyword toTracebackException.__init__()
in Python <3.10. Is this acceptable?python-version:
insanity in the GHA workflow, just in case it doesn't get rejected...typed-ast
not building on 3.10-devCheck out the 3.10-dev compilation failuremaster
branch but likely don't want to leave that laying around post-merge.All
job:]
)