-
Notifications
You must be signed in to change notification settings - Fork 308
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
Feature suggestion: Show Warehouse URL after upload
#459
Comments
I'd be happy to submit a PR for this. |
upload
upload
Please do! Sounds like a wonderful feature.
…On Wed, May 8, 2019, 1:18 PM Brian Rutledge ***@***.***> wrote:
I'd be happy to submit a PR for this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#459 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAB5I45SRCWH2BCSJXGAF3LPUMYQBANCNFSM4HLU4SGQ>
.
|
I'm starting to dig into this, and I have a couple thoughts/questions about the approach. As I understand it, a single upload can potentially include multiple releases, each with multiple To get a release URL, it looks like we could derive it for PyPI/TestPyPI using the from the class Repository:
def url_for_package(self, package: PackageFile) -> str:
meta = package.metadata_dictionary()
return f"{self.url}/{meta['name']}/{meta['version']}" Or, we could query the Warehouse API after the file is uploaded to get the official URLs. This seems more "correct" in the sense that it allows the URL format to change. However, it adds the complexity and time of an additional HTTP request. On the other hand, Twine already queries the API to determine if a package is uploaded; it seems like that code could possibly be refactored to serve this purpose. Any suggestions before I go further? |
I started working on this over the weekend. Hoping to submit a PR this week. |
While following the packaging tutorial during the PyCon 2109 sprints, I thought a small enhancement would be to provide the web URL for the release.
For example:
Your operating system:
macOS
Version of python you are running:
3.7.3
How did you install twine?
Forked repo
Version of twine you have installed (include complete output of):
twine version 1.13.0 (pkginfo: 1.5.0.1, requests: 2.21.0, setuptools: 41.0.1, requests-toolbelt: 0.9.1, tqdm: 4.31.1)
Which package repository are you targeting?
TestPyPI, PyPI
The text was updated successfully, but these errors were encountered: