-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
reenable pytest -p unraisableexception and -p threadexception #1898
reenable pytest -p unraisableexception and -p threadexception #1898
Conversation
04b2f56
to
624736d
Compare
|
||
@contextmanager | ||
def disable_threading_excepthook(): | ||
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.
sadly threading.__excepthook__
is only in 3.10, so I disable the hook rather than restore the old one
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 don't know... if we were already testing 3.10 then maybe it would be good practice to put an if
in here to use threading.__excepthook__
when possible and then when we dropped 3.9 there would be a coverage loss and we'd remove the work around. But we aren't testing against 3.10... so... a comment? Or perhaps this is too far forward looking to be appropriate.
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.
Probably shouldn't hold this up. Maybe I'll add something in #1921.
Codecov Report
@@ Coverage Diff @@
## master #1898 +/- ##
==========================================
- Coverage 99.59% 93.80% -5.80%
==========================================
Files 114 114
Lines 14574 14576 +2
Branches 1110 1113 +3
==========================================
- Hits 14515 13673 -842
- Misses 42 822 +780
- Partials 17 81 +64
|
c03e3a9
to
7b65819
Compare
e565569
to
6273b1e
Compare
See https://gitter.im/python-trio/general?at=602b8e1293539e23437b2daa for the Fedora failure |
faulthandler_timeout = 60 | ||
markers = ["redistributors_should_skip: tests that should be skipped by downstream redistributors"] | ||
junit_family = "xunit2" | ||
filterwarnings = ["error"] |
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.
The -W error
in ci.sh
wouldn't be needed anymore, right?
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 pretty sure it's redundant now, but does no harm there
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.
It'll be confusing when someone wants it off and changes one spot and it's still active. Or when they are looking to Trio as an example.
@@ -1,9 +0,0 @@ | |||
[tool:pytest] |
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 would prefer that unrelated restructures like this be handled separately. Just commenting, not part of the requested changes.
|
||
@contextmanager | ||
def disable_threading_excepthook(): | ||
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.
I don't know... if we were already testing 3.10 then maybe it would be good practice to put an if
in here to use threading.__excepthook__
when possible and then when we dropped 3.9 there would be a coverage loss and we'd remove the work around. But we aren't testing against 3.10... so... a comment? Or perhaps this is too far forward looking to be appropriate.
Co-authored-by: Kyle Altendorf <sda@fstab.net>
faulthandler_timeout = 60 | ||
markers = ["redistributors_should_skip: tests that should be skipped by downstream redistributors"] | ||
junit_family = "xunit2" | ||
filterwarnings = ["error"] |
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.
It'll be confusing when someone wants it off and changes one spot and it's still active. Or when they are looking to Trio as an example.
|
||
@contextmanager | ||
def disable_threading_excepthook(): | ||
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.
Probably shouldn't hold this up. Maybe I'll add something in #1921.
by restoring the default unraisablehook, and disabling the threading.excepthook in tests that need it