playwright-python icon indicating copy to clipboard operation
playwright-python copied to clipboard

[Feature]: Upload sdists to pypi

Open alex opened this issue 1 year ago • 4 comments

🚀 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).

alex avatar Oct 01 '24 14:10 alex

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.

mxschmitt avatar Oct 01 '24 14:10 mxschmitt

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.

alex avatar Oct 01 '24 14:10 alex

Hi. Homebrew maintainer here. I'm writing a formula right now and it requires playwright. It would be very helpful to have an sdist on PyPI so we don't have to use manual workarounds. Thanks!

p-linnane avatar Apr 10 '25 03:04 p-linnane

@mxschmitt @agg23 Hi, sorry for the ping. Just following up. Having an sdist on PyPI would allow us to include more software in Homebrew that uses Playwright. As it stands, we are unlikely to accept any other software that requires Playwright since the current state breaks our dependency handling automation. Please let me know if there's any clarification needed from us. Thanks!

p-linnane avatar Jul 30 '25 20:07 p-linnane