Skip to content

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

@mistercrunch

Description

@mistercrunch

🚀 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions