Skip to content
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

[Feature]: relax greenlet dependency version requirements in pyproject.toml #2666

Open
mistercrunch opened this issue Nov 25, 2024 · 2 comments

Comments

@mistercrunch
Copy link

🚀 Feature Request

First! Thanks for an awesome project/library. We use playwright in apache/superset and clearly it has simplified running end-to-end tests on multiple browsers and headless-browser workloads like taking screenshots / thumbs. Grateful for much sanity in the headless browser space.

I was wondering it it would make sense for you all to relax the [currently] pinned dependencies for the library. Currently playwright forces a certain version of greenlet (3.1.1) https://github.com/microsoft/playwright-python/blob/main/pyproject.toml#L16, which conflicts with other reqs in our repository, and prevents us from upgrading greenlet to a newer version while using playwright with other libs that need other versions of greenlet.

For the CLI functionality it's not an issue, but somehow we also import the lib and use it in our modules too, so given python's lack of support for diamond dependencies it's creating a conflict.

Anyhow, the standard practice is to relax deps to ranges in your package metadata, say greenlet>=3.1.1, and to use pip-compile or uv to pin dependencies, usually in a requirements.txt, that can be used in CI to get deterministic outcomes, and can be bumped periodically. Though I understand there may be good reasons for you all to pin directly in pyproject.toml (?)

Anyhow, happy to help too. I almost opened a PR but I'm not familiar with CI scripts and other automation you may have.

Example

pip install playwright

Motivation

People will be able to use playwright in combination with other libraries that have library range restrictions for greenlet that fall outside of 3.1.1

@mxschmitt
Copy link
Member

Happy to relax it. Do you mind creating a PR? Looks like it was filed before in #2190.

This requires changing the meta.yaml and pyproject.toml.

@mistercrunch
Copy link
Author

#2669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants