-
-
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
Turn warnigns into errors in the test suite #187
Conversation
Hum apparently it's in core pytest since 2 weeks ago. Is that ok to require py.test >= 3.1 ? |
Requiring a new pytest is totally fine. You might want to modify appveyor.yml as well. |
bfd7f95
to
78500a8
Compare
Codecov Report
@@ Coverage Diff @@
## master #187 +/- ##
=======================================
Coverage 98.44% 98.44%
=======================================
Files 53 53
Lines 6129 6129
Branches 476 476
=======================================
Hits 6034 6034
Misses 80 80
Partials 15 15 Continue to review full report at Codecov.
|
Wooow. The travis job from my fork got a coredump, hopefully the PR is fine, but it's concerning. |
Umm. Wow. That is definitely a bit worrisome. Your link doesn't work for me, though... does it say anything useful? (I have a suspicion it might be because |
(I should say: specifically what I'm nervous of is that this might be a real bug in Python that we might hit again on random test runs depending on the phase of the moon etc. If so we need to figure it out and do whatever we have to to make sure it never happens again. Flaky tests are a constant issue for an I/O library like trio, so I'm super super vigilant about trying to keep them out. Anything else and you end up with like N different bugs that each causes a random test failure in 1/N times and it's unbearable.) |
Link updated.
|
And it does trigger on travis about every-other time, but apparently AFAICT only 3.5 and 3.5.2 are affected. Relaunch most of the jobs of this batch a couple of time and only 3.5. and 3.5.2 got failures. So I'm tempted to say it's "fixed". |
If it's only 3.5 then that's great for the python devs, but not so helpful for us, since we do want to keep testing on 3.5 :-). I left I guess next step will be to figure out how to get a stack trace, or otherwise figure out where exactly it's crashing... |
Just getting a failing run with |
I'll try to do that, and see fi I can bisect which test(s) create that. |
I just built a copy of 3.5.0 locally, and the first time running It seems to be in |
Misc/NEWS for 3.5.3 says:
|
In addition to cluttering up the test output now that pytest collects and shows warnings, this causes segfaults on some CI builds when run with -W error (see python-triogh-187).
See gh-189 |
Ha, good catch thanks ! |
We still need to come up with something for resource warnings and unawaited coroutine warnings (#169) – ironically these are the two types of warnings that this PR doesn't catch (because they're both generated from |
In my other PR, I do attach the un awaited coroutines to NonAwaitedCoroutine error; which does allow to catch the exception and potentially consume them. I can or maybe (should ?) extend it with a context manager that keep a ref to all non-awaited coroutines within it ? |
Whoops, meant to merge this :-) |
Thanks. |
...wtf, somehow the segfault still happened after merging into master: https://travis-ci.org/python-trio/trio/builds/240581553 ...ugh, yeah, I can reproduce locally too if I re-run it enough times. Apparently #189 didn't actually fix anything. |
Oh right, with all this I almost forgot. My rule is anyone whose PR gets merged gets offered a commit bit :-). Want one? You can participate as much or as little as you like. |
Happily, that will force me to try to review a bit more code :-) |
Well, if you put it that way... invitation sent ;-)
I just haven't had a chance to look at them seriously yet and form an opinion. I'm certainly open to providing them if it would be useful. A minor issue is that sphinxcontrib-trio might need to be taught to handle them in a way that keeps the docs looking good (python-trio/sphinxcontrib-trio#4), but I'm sure that's solvable and probably needs to happen anyway. |
No description provided.