-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unparallelize pytest for Python 3.5 everywhere
- Loading branch information
Showing
1 changed file
with
4 additions
and
0 deletions.
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
1778189
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.
@webknjaz Which problems this causes? Referenced PR looks wrong.
1778189
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.
@kxepal try it locally under 3.5 with
-n auto
and you will see :)1778189
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.
Example: https://travis-ci.com/aio-libs/aiohttp/jobs/153096564
1778189
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 3.5.5, current master, no any issues noticed.
1778189
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.
See the log above
1778189
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's a leftover from #2991, where I did this for Linux job only
1778189
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.
Interesting. Thanks!
1778189
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.
@kxepal your excerpt looks like you used a single worker. For me (under 3.7) the time was reduced from 60s to 18s. How exactly did you run that? Show me starting output up to the testing start.
1778189
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 did naive
it spawn 4 workers for me if I get it right
1778189
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.
Ok, I got an error, but different one by installing uvloop.
...the differrence is the very long list. gw are always random, but always any two.
1778189
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.
Ah.. you've got 4-core machine w/o HT. Makes sense. My Lenovo P50 runs 8 workers with
auto
. Anyway, in all of envs I've got it to run under Python 3.5 lots of tests failed withResourceWarning: unclosed event loop
, which might be related to some OS constraints, but is only reproducible under Python 3.5. So if you know how to cure that, send a PR.1778189
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.
@kxepal that error can be fixed by setting
PYTHONHASHSEED
env var to some value, so that all workers would have the same seed.1778189
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.
Ref pytest-dev/pytest#920 (comment)
1778189
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.
PYTHONHASHSEED helped, thanks!
Unlikely I can cure what I cannot reproduce, I just was wondering about the issue. Thank you for references and detailed explanation!
🍺