Move away from depending on 'py' requirement #14867
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One-line summary
The
py
package is explicitly required, but no package directly depends on it.EDIT: Some
pytest-*
plugins (at least in the versions used here) do requirepy.*
imports, but fail to declarepy
as dependency (becausepytest<v7.2.0
did that for them) — they'd need to be updated or removed first.Significant changes and points to review
What turned out as a blocker is pytest's removal of py in 7.2.0 and vendoring just the useful bits left its plugins without explicit py dependency but still relying on e.g. py.xml broken from that point on, so only those still maintained and updating/replacing their dependencies will continue working with newer releases (or will need a py version explicitly required and pinned like here now, until updated). But that upgrade is currently blocked: #14013 (also see #14316 for more issues in version compatibility), truth is replacing Selenium with Playwright might happen faster than this.
TODO:
Issue / Bugzilla link
Resolves #14851
Testing
make build
&&make test
&&make run
Just to verify the legacy entrypoints still work (they are equivalent):
(
docker-compose run test
)pytest bedrock/firefox
is the same as
(
docker-compose run test
)py.test bedrock/firefox