Skip to content

[tests] add Python 3.10 env, update pytest dependency#30

Merged
Gallaecio merged 6 commits intomasterfrom
ci-python-3.10
Oct 9, 2021
Merged

[tests] add Python 3.10 env, update pytest dependency#30
Gallaecio merged 6 commits intomasterfrom
ci-python-3.10

Conversation

@elacuesta
Copy link
Member

Dependency hell. pytest==6.2.5 is needed for Python 3.10 support. We currently have pytest-asyncio<0.11 (tests break otherwise), which breaks with the default pytest_pycollect_makeitem implementation from pytest>=5.4.

The next step would be to figure out a way to update pytest-asyncio.

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #30 (1dd2e2c) into master (f3e5cfc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #30 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 3 3 Lines 158 189 +31 ========================================= + Hits 158 189 +31 
Impacted Files Coverage Δ
scrapy_playwright/handler.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3e5cfc...1dd2e2c. Read the comment docs.


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).
Copy link
Contributor

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?

Copy link
Member Author

@elacuesta elacuesta Oct 8, 2021

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.

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

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 👍

@Gallaecio Gallaecio merged commit ff4789f into master Oct 9, 2021
@elacuesta elacuesta deleted the ci-python-3.10 branch October 9, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants