microsoft / playwright-python

Python version of the Playwright testing and automation library.
https://playwright.dev/python/
Apache License 2.0
11.99k stars 925 forks source link

[Feature]: Upload sdists to pypi #2579

Open alex opened 2 months ago

alex commented 2 months ago

🚀 Feature Request

Currently only wheels are uploaded to pypi, but sdists are not. It would be helpful if sdists were supported.

Example

No response

Motivation

Homebrew always builds packages from source. As a result, it cannot download playwright from PyPI, and instead needs download the source out-of-band from the git tag. This means that formulas which use playwright cannot particulate in automatic version upgrades.

If the sdists were uploaded to PyPI, this would make keeping python formulas that use playwright up to date dramatically easier (including resolving security issues).

mxschmitt commented 2 months ago

Are you interested in publishing Playwright for Python to homebrew or how do you stumble over that?

Inside the wheels there is the matching Node.js binary for the OS/arch combination which Playwright internally is using. In theory we could upload the sdist but we didn't, since we had no need for it and it was like a protection for users, that if there was no matching wheel available, their OS/arch wasn't supported. Pypy gave usually a nice error message for that.

alex commented 2 months ago

playwright-python is currently a dependency of one homebrew package: https://github.com/Homebrew/homebrew-core/blob/master/Formula/t/theharvester.rb#L202-L205

As you can see, for all the other dependencies, we download sdists from PyPI, but for this we download the source from github. This has the unfortunate problem of interfering with our automation for automatically handling dependencies.