This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shimizukawa
Recipients dstufft, eric.araujo, shimizukawa
Date 2018-01-29.22:58:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517266728.23.0.467229070634.issue32716@psf.upfronthosting.co.za>
In-reply-to
Content
Although document https://docs.python.org/3.6/distutils/packageindex.html#package-cmdoptions says "The --repository or -r option lets you specify a PyPI server different from the default", if there is no URL specified in ``.pypirc`` it will display "ValueError: <URL> not found in .pypirc".


::

  $ python3 setup.py register -r https://test.pypi.org/legacy/
  running register
  running egg_info
  writing dependency_links to test.egg-info/dependency_links.txt
  writing top-level names to test.egg-info/top_level.txt
  writing test.egg-info/PKG-INFO
  reading manifest file 'test.egg-info/SOURCES.txt'
  writing manifest file 'test.egg-info/SOURCES.txt'
  Traceback (most recent call last):
    File "setup.py", line 4, in <module>
      setup(name='test')
    File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/setuptools/command/register.py", line 10, in run
      orig.register.run(self)
    File "/usr/lib/python3.5/distutils/command/register.py", line 45, in run
      self._set_config()
    File "/usr/lib/python3.5/distutils/command/register.py", line 80, in _set_config
      raise ValueError('%s not found in .pypirc' % self.repository)
  ValueError: https://test.pypi.org/legacy/ not found in .pypirc

  $ python3 -V
  Python 3.5.2

  $ lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 16.04.3 LTS
  Release:        16.04
  Codename:       xenial

This behavior could be confirmed on Windows.

I think there are two correction methods.
One is to fix it so that we can specify any URL regardless of the setting of .pypirc.
The other is to write in the document that "-r option can specify server name or URL in .pypirc".
History
Date User Action Args
2018-01-29 22:58:48shimizukawasetrecipients: + shimizukawa, eric.araujo, dstufft
2018-01-29 22:58:48shimizukawasetmessageid: <1517266728.23.0.467229070634.issue32716@psf.upfronthosting.co.za>
2018-01-29 22:58:48shimizukawalinkissue32716 messages
2018-01-29 22:58:47shimizukawacreate