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
[tests] add Python 3.10 env, update pytest dependency #30
Conversation
Codecov Report
@@ Coverage Diff @@
## master #30 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 158 189 +31
=========================================
+ Hits 158 189 +31
Continue to review full report at Codecov.
|
tests/conftest.py
Outdated
|
||
In the context of scrapy-playwright, this allows to unpin the outdated pytest<5.4.0 dependency, | ||
while keeping pytest-asyncio==0.10, as pytest-asyncio>=0.11 currently breaks tests | ||
(likely to be because of https://github.com/pytest-dev/pytest-asyncio/issues/157). |
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.
Is the problem pytest-dev/pytest-asyncio#157 or the fix for it (pytest-dev/pytest-asyncio#156) introduced in 0.12? Is pytest-asyncio>=0.12
not an option?
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.
0.11
is the first version that fails. I tried versions 0.12
and 0.15.1
(the latest at the time of writing) and they also fail. I think upgrading it might take some more research.
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.
Upon closer inspection, the errors with 0.12
point to Twisted (RuntimeError: twisted reactor has stopped
). There are probably some unexpected interactions with pytest-twisted
.
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.
Since pytest-dev/pytest-asyncio#157 is probably not the issue then, shall we just remove the parenthesized statement from the comment and merge?
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.
Fair point, now the issues are mentioned here for future reference anyway 👍
Dependency hell.
pytest==6.2.5
is needed for Python 3.10 support. We currently havepytest-asyncio<0.11
(tests break otherwise), which breaks with the defaultpytest_pycollect_makeitem
implementation frompytest>=5.4
.The next step would be to figure out a way to update
pytest-asyncio
.