Issue #246 resolved

upload fails if "-r" flag wasn't supplied

Guy Rozendorn
created an issue

This bug was introduced after issue #244.

I will update the issue with the complete content shortly.

Comments (2)

  1. Guy Rozendorn reporter
    • changed status to open

    This issue rises from another ambiguity in Python's distutils.

    As you can read in the, the default repository is, but in the code, its

    If no repository argument is supplied in the command-line (remember, the argument is actually a section name in .pypirc, or the url itself), then it looks for the default

    Then, this default is matched against any section in your .pypirc file. If this default matches a section's name, or its repository value, then it is returned. If nothing is matched, then the upload command gets no username and password.

    If you're following the documentation, you're bound to fail because you wrote down the repository as, which will result in a mismatch.

    I can think of two ways to resolve this issue:

    1. Change the DEFAULT_REPOSITORY to "pypi" or, which matches the documentation.
    2. Change the logic so that if the URL in the current section matches and you didn't supply a repository argument in the command-line, it will return the information from this section, instead of skipping it.

    Option #1 is more 'correct', but #2 is safer and more compatible -- as people may have used

  2. Log in to comment