Closed FauxPrada closed 1 month ago
Hi! the /simple/
url is the index url, the upload url ends with /upload/
instead. Could you try again with that other url?
Hi! the
/simple/
url is the index url, the upload url ends with/upload/
instead. Could you try again with that other url?
OMG you're RIGHT πππ
That's on me for blindly copying the Twine setup link from the Azure devops docs page - without checking it was correct. Bless u
It works like a charm now
uv publish --publish-url https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload --verbose --username VssSessionToken
DEBUG uv 0.4.18
warning: `uv publish` is experimental and may change without warning
Publishing 4 files https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload
DEBUG Using request timeout of 30s
Uploading package-2.1.0-py3-none-any.whl (27.2KiB)
DEBUG Checking keyring for credentials for VssSessionToken@https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload
[Information] [CredentialProvider]VstsCredentialProvider - Acquired bearer token using 'MSAL Silent'
[Information] [CredentialProvider]VstsCredentialProvider - Attempting to exchange the bearer token for an Azure DevOps session token.
DEBUG Found credentials in keyring for https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload
DEBUG Response code for https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload: 409 Conflict
DEBUG Upload error response: {"$id":"1","innerException":null,"message":"The feed 'Feed' already contains file 'package-2.1.0-py3-none-any.whl' in package 'package 2.1.0'.","typeName":"Microsoft.VisualStudio.Services.Packaging.Shared.WebApi.Exceptions.PackageAlreadyExistsException, Microsoft.VisualStudio.Services.Packaging.Shared.WebApi","typeKey":"PackageAlreadyExistsException","errorCode":0,"eventId":3000}
INFO Upload succeeded
File already exists, skipping
Uploading package-2.1.0.tar.gz (27.1KiB)
DEBUG Response code for https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload: 200 OK
INFO Upload succeeded
Uploading package-2.1.1-py3-none-any.whl (34.2KiB)
DEBUG Response code for https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload: 200 OK
INFO Upload succeeded
Uploading package-2.1.1.tar.gz (36.3KiB)
DEBUG Response code for https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/upload: 200 OK
INFO Upload succeeded
You're a gem, good PR too it'll stop people like me coming here in future lol. I'll let that pull close the issue. Cheers
I ended up using
uv publish --publish-url https://pkgs.dev.azure.com/{organisation}/{project}/_packaging/{feedName}/pypi/upload/ --token PAT
and avoiding keyring as it gave me a nasty error.
Hello,
My apologies if this is already a feature, and I'm misunderstanding how to publish.
The ability to publish a wheel package to Azure artifacts would be greatly welcomed. I hate using GitHub Issue's to ask for help so I'm potentially writing this under the guise of a Feature Request.
At the moment
uv publish
can attempt to publish to Artifacts:Using:
uv publish --publish-url https://pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/simple/ --verbose --username VssSessionToken
Gets us:While alternativly:
uv publish --publish-url https://VssSessionToken@pkgs.dev.azure.com/Company/Package/_packaging/Feed/pypi/simple/ --verbose
Gets usThis is with using
pyproject.toml
to configure "keyring-provider" and "extra-index-url" under[tool.uv]
which appears to be working nicely.Alternativly, if anyone has any ideas on how to bodge my config into letting me upload a package to Artifacts, that would be very welcomed!
If this is just user-error then I'll pretend this Issue was actually a Documentation idiotification Feature Request :)
Thanks!