Skip to content
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

Documentation contains an obsolete link #214

Closed
exhuma opened this issue Sep 25, 2016 · 5 comments
Closed

Documentation contains an obsolete link #214

exhuma opened this issue Sep 25, 2016 · 5 comments

Comments

@exhuma
Copy link

exhuma commented Sep 25, 2016

I'm currently following the packaging guide, and the section about creating an account contains an obsolete link about to upload packages.

It says to use: repository = https://upload.pypi.org/legacy/, but when I use this, and then run twing register my_package.whl, I get the following error:

Registering package to https://upload.pypi.org/legacy/
Enter your password:
Registering puresnmp-1.0.0b1-py3-none-any.whl
HTTPError: 410 Client Error: This API is no longer supported, instead simply upload the file. for url: https://upload.pypi.org/legacy/

Removing the line from .pypirc makes it work!

@zirpu
Copy link

zirpu commented Sep 30, 2016

I'm using twine 1.8.1, and it still tries to use the upload.pypi.org/legacy/ url, even w/o the repository setting in .pypirc.

trying to do this:

twine upload --repository-url https://bogus.com  dist/*

still results in:

HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/

@sigmavirus24
Copy link
Member

@zirpu you're running into #206. --repository-url was poorly implemented in buggy. I also won't be able to fix it by myself anytime soon (c.f. https://twitter.com/sigmavirus24/status/781851776655892480)

@brainwane
Copy link
Contributor

I'm on Twine 1.9.1 and the behavior is different from what @zirpu experienced but still probably suboptimal:

$ twine upload --repository-url https://example.com  dist/*
Uploading distributions to https://example.com
Enter your username: bfhs
Enter your password: 
Uploading Forms990_analysis-1.0.0-py3-none-any.whl
Uploading Forms990-analysis-1.0.0.tar.gz 
$

(I typed in some nonsense for username and password.)

My package does not seem to be up at pypi.org, test.pypi.org, or pypi.python.org; I don't understand what twine did here.

@di
Copy link
Member

di commented Feb 1, 2018

@brainwane Assuming you actually used https://example.com, this is a real domain which will accept just about anything you send to it:

$ http POST example.com launchBallisticMissiles:true --headers
HTTP/1.1 200 OK
...

So presumably twine got a 200 OK for your distribution upload, and as far as it knows, it succeeded.

@brainwane
Copy link
Contributor

(I knew example.com was a real domain but I did not realize that it would actually give 200 OK to everything like that. Thanks for the wake-up call @di!)

I run brainwane.net and know it is not a package index :) so I tested with that:

$ twine upload --repository-url https://brainwane.net  dist/*Uploading distributions to https://brainwane.net
Enter your username: brainwane
Enter your password: 
Uploading Forms990_analysis-1.0.0-py3-none-any.whl
SSLError: HTTPSConnectionPool(host='brainwane.net', port=443): Max retries exceeded with url: / (Caused by SSLError(CertificateError("hostname 'brainwane.net' doesn't match either of '*.bizland.com', 'bizland.com'",),))

Given that the documentation is now accurate and Twine doesn't have the issue @zirpu mentioned anymore, I think we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants