-
Notifications
You must be signed in to change notification settings - Fork 901
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
uv publish
times out when uploading large packages (~85MiB)
#7809
Comments
Can you share verbose logs with |
Here are logs when trying to upload to code.forgejo.org -
|
Hm weird. It's not clear to me what's going on there. cc @konstin |
I'm getting this in my forgejo instance logs when I upload, but I'm not getting anything more meaningful -
forgejo code - https://codeberg.org/forgejo/forgejo/src/commit/e3eaa284bb86a3767bff7c601f74e8350b66f6f4/routers/api/packages/pypi/pypi.go#L107-L190 |
I unfortunately can't reproduce, uploading succeeds for me: https://code.forgejo.org/konstin/-/packages/pypi/black/0.1.0 |
Are you using a PAT as password or a regular password? I did not mention this earlier, but I was using a PAT |
I generated a token and used that for the upload |
I'll see if I can't get it working again on my end and give a better example |
Here is a pre-built wheel that I cannot upload using code to run:
This fails for me in the same way as above. I can successfully upload the wheel using twine:
I also tried testing by uploading to https://test.pypi.org/legacy to see if it was specific to forgejo, but I need to rebuild the wheel with a different name because of namespace issues. Ill update once I get to rebuilding and if I encounter the same timeout. |
I was able to reproduce this problem when uploading a package to https://test.pypi.org/legacy/ . Since pypi has namespace and size limits, creating an MRE is a little involved - export MY_PYPI_TOKEN=
mkdir -p test_uv_publish_size/src/my_package
cd test_uv_publish_size
## make pyproject.toml
cat <<EOF > pyproject.toml
[project]
name = "test_uv_publish_size_$(openssl rand -hex 4)"
version = "0.0.1"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/my_package"]
EOF
## make our program
cat <<EOF > src/my_package/__init__.py
print("Hello World")
EOF
## fake our package size
dd if=/dev/urandom of=src/my_package/test_data bs=90MB count=1
## build with uv
uv build --wheel .
## upload with uv
uv publish --publish-url https://test.pypi.org/legacy/ --token $MY_PYPI_TOKEN dist/* Here is what my console looks like during the failure: |
uv publish
times out when uploading package to forgejo registryuv publish
times out when uploading large packages (~85MiB)
A 30s timeout is too low when uploading a large package over a home internet connection, where uploads can be 10x slower than downloads. We increase the default limit to 15min, while keeping the environment variables to override this intact. In the process, I've lifted the conversion of the timeout seconds to `Duration` up. `Duration::from_mins` is nightly only so we don't quite get the benefit yet. Fixes #7809
A 30s timeout is too low when uploading a large package over a home internet connection, where uploads can be 10x slower than downloads. We increase the default limit to 15min, while keeping the environment variables to override this intact. In the process, I've lifted the conversion of the timeout seconds to `Duration` up. `Duration::from_mins` is nightly only so we don't quite get the benefit yet. Fixes #7809
A 30s timeout is too low when uploading a large package over a home internet connection, where uploads can be 10x slower than downloads. We increase the default limit to 15min, while keeping the environment variables to override this intact. In the process, I've lifted the conversion of the timeout seconds to `Duration` up. `Duration::from_mins` is nightly only so we don't quite get the benefit yet. Fixes #7809
When using
uv publish
to upload a package to a personal forgejo instance or at https://code.forgejo.org, I'm experiencing timeouts at the authentication stage. I'm seeing this when using either--username
and--password
or--token
. Usinguvx twine upload
works.EDIT:
I've also tested this against https://test.pypi.org/legacy/ and experience the same issue. See #7809 (comment)
The text was updated successfully, but these errors were encountered: