Closed thibmonsel closed 1 month ago
Thanks for the issue! Currently trying to debug this in #16755.
Accidentally closed, I'm not sure we've figured out what the issue is here yet.
I still can't reproduce this myself but I've merged https://github.com/pypi/warehouse/pull/16755 which might help, can you retry and see if this is still happening?
On my end, it doesn't seem so ! I'll with the regular pypi and not test pypi to see if its test pypi problem or not.
I've encountered this via a github action as well. I just tried re-running the failed action, but getting the same error. I am also using the pypa/gh-action-pypi-publish@release/v1 action. Seeing this on two repositories, one setup to use Trusted Publisher and the other using a token, both using the skip-existing
Interesting, one repo is seemingly successful uploading the .whl, but fails on the tarball. Here's some verbose output if it's any help.
Uploading distributions to https://test.pypi.org/legacy/
INFO dist/scout_apm_logging-0.1.2-py3-none-any.whl (4.5 KB)
INFO dist/scout_apm_logging-0.1.2.tar.gz (3.2 KB)
INFO password set by command options
INFO username: __token__
INFO password: <hidden>
Uploading scout_apm_logging-0.1.2-py3-none-any.whl
INFO Response from https://test.pypi.org/legacy/:
200 OK
INFO <html>
<head>
<title>200 OK</title>
</head>
<body>
<h1>200 OK</h1>
<br/><br/>
</body>
</html>
Uploading scout_apm_logging-0.1.2.tar.gz
INFO Response from https://test.pypi.org/legacy/:
[40](https://github.com/scoutapp/scout_apm_python_logging/actions/runs/10930758049/job/30389277563#step:4:41)0 Bad Request
INFO <html>
<head>
<title>400 Bad Request</title>
</head>
<body>
<h1>400 Bad Request</h1>
The server could not comply with the request since it is either
malformed or otherwise incorrect.<br/><br/>
POST body may not contain duplicate keys (URL:
'https://test.pypi.org/legacy/')
</body>
</html>
ERROR HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
Bad Request
Thanks for taking a look at this. The issue seems to only be effecting to our devel (testPyPI) workflow, and only occurs when trying to push a version already uploaded to testPyPI (Hence the skip-existing
). Bumping the version bypasses this error.
We've identified the issue, https://github.com/pypi/warehouse/pull/16759 will fix this once it's merged & deployed.
I didn't have any version of the package on PyPI but by using the workflow :
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/torchdde # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
The release of the distribution package was successful. (maybe the latest commit come through)
So this is either a problem probably coming from test PyPI itself or the update of packages.
I am also seeing this error:
This is maybe a bug but i'm not sure. I've been following the tutorial for automating the push of latest packages on pip from here. I'm trying to do it on Test PyPI for now.
I have the following workflow to release the distribution package on Test PyPI :
I have also followed to add the trusted publishers from the PyPI website so there is no need to specify the API tokens apparently.
The issue arises at Publish package distributions to TestPyPI :
I'd like also to note that my current master is on version 0.1.0 and that the first PyPI test was done successfully by doing the CLIs with a version 0.0.1 so i'm not sure that the version bumping is the problem here.
The github action provides the url link to the release 0.0.1 and not 0.1.0 :
This seems to be related to https://github.com/pypi/warehouse/pull/16732 but I'm not sure.