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

Distributing: First time registration fails when following guide. #309

Closed
bernhardreiter opened this issue May 4, 2017 · 7 comments
Closed
Labels
type: bug A confirmed bug or unintended behavior

Comments

@bernhardreiter
Copy link

As a first time user of pypi uploading I've following the current official guide
which right now is https://github.com/pypa/python-packaging-user-guide/blob/e548d9febaddb94dce34a5b860110e825cd71493/source/distributing.rst#id122 .

Using the advise of the first note and going to testpypi, I've used the instructions at https://wiki.python.org/moin/TestPyPI to set up an .pypirc with the repository = settings.
Of course I've used this for the real pypi as well and then the implicit registration with twine failed.

My next step was to try if twine had a register command, but I could not easily find out how it works because twine version 1.8.1 (pkginfo: 1.4.1, requests: 2.13.0, setuptools: 35.0.2,
requests-toolbelt: 0.7.1, clint: 0.5.1) --help does not tell me and does not hint that twine register --help would give help to me. My solution was to lookup the source code for twine and find out how it works, which was time-consuming and frustrating.

Now I'm reporting the issue, because I was only a first time user once, now the problem is solved for me, but other first-time users will run into this with a good chance.

So reading up on it:

  • New tutorials: publish a package #204 would be a solution of course, but looks like a lot more work.
  • The discussion in Remove "twine register" reference in distributing.rst #271 shows that you are on to the problem in principle, but the combination of other information sources and the guide still lead to the difficulty remaining unsolved so far. And the difference in the repository = attribute is to little to be recognised. Potential course of action: Add another warning that it is important to leave out the ``repository = ``` attribute to the real .pypirc for implicit registration to work.
  • Update the wiki at https://wiki.python.org/moin/TestPyPI , which is good, but because there may be other places of outdated information, it is not enough.
  • Improve twine to give a better error message like: You are using the old api to pypi, try using the new one by leaving out the repository = attribute.
@theacodes theacodes added the type: bug A confirmed bug or unintended behavior label May 5, 2017
@theacodes
Copy link
Member

Add another warning that it is important to leave out the ``repository = ``` attribute to the real .pypirc for implicit registration to work.

I'm wary on this because we're definitely targeting "new" users for the tutorial, which of course means that they wouldn't have put anything in the repository field, that said, I'm up for adding it temporarily if @ncoghlan thinks it's a good call.

Update the wiki at https://wiki.python.org/moin/TestPyPI , which is good, but because there may be other places of outdated information, it is not enough.

I can definitely do this.

Improve twine to give a better error message like: You are using the old api to pypi, try using the new one by leaving out the repository = attribute.

@bernhardreiter I'd recommend going ahead and filing a bug over at twine and referencing this one. (I can do it for you, if you want)

@bernhardreiter
Copy link
Author

bernhardreiter commented May 8, 2017

we're definitely targeting "new" users for the
tutorial, which of course means that they wouldn't have put anything in the
repository field

As I was a new user, my experience was that I had it just put in because of the hint I've found on the TestPyPI wiki. I also expect that other new users may use a search engine or elder blog entries or books and may also end up having this option in when coming to a first real upload the first time. And I did not expect leaving out a seemly harmless option like repository = was so important.

I'd recommend going ahead and filing a bug over at twine and referencing this one. (I can do it for you, if you want)

Please do! Thanks @jonparrott!

@theacodes
Copy link
Member

I can't seem to even register for the wiki, so I think the best course is for us to have our own testpypi docs and stop linking to the wiki.

Maybe @dstufft or @ncoghlan have a wiki account (with editor access) and can update it? We just need to remove the repository line.

@ncoghlan
Copy link
Member

Aye, registration to edit the wiki is unfortunately a little convoluted due to persistent spam problems: https://wiki.python.org/moin/FrontPage#use

I've edited https://wiki.python.org/moin/TestPyPI to be consistent with the PyPUG guidance, and also added a comment that links back to the relevant section (hit "Comments" in the nav bar to see it).

@theacodes
Copy link
Member

theacodes commented May 23, 2017 via email

@theacodes
Copy link
Member

Since this is adequately tracked by the upstream bug in twine and the wiki is fixed, I'm gonna go ahead and close this. If anyone disagrees, feel free to comment and I'll happily re-open. :)

@theacodes
Copy link
Member

Small update: this has been fixed in twine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants