@@ -11,7 +11,6 @@ the new location.
1111
1212This section covers how to migrate to the new PyPI.org for different tasks.
1313
14-
1514Uploading
1615---------
1716
@@ -44,8 +43,36 @@ your upload tool's default URL.
4443If for some reason you're unable to upgrade the version of your tool to a
4544version that defaults to using PyPI.org, then you may edit ``~/.pypirc `` and
4645include the ``repository: `` line, but use the value
47- ``https://upload.pypi.org/legacy/ `` instead.
46+ ``https://upload.pypi.org/legacy/ `` instead::
47+
48+
49+ .. code ::
50+
51+ [distutils]
52+ index-servers =
53+ pypi
54+
55+ [pypi]
56+ repository:https://upload.pypi.org/legacy/
57+ username:yourusername
58+ password:yourpassword
4859
4960 If you use TestPyPI, you must update your ``~/.pypirc `` to handle
5061TestPyPI's new location, by replacing ``https://testpypi.python.org/pypi ``
5162with ``https://test.pypi.org/legacy/ ``.
63+
64+
65+ Registering package names & metadata
66+ ------------------------------------
67+
68+ Explicit pre-registration of package names with the `setup.py register `
69+ command prior to the first upload is no longer required, and is not
70+ currently supported by the legacy upload API emulation on `pypi.org `.
71+
72+ As a result, attempting explicit registration after switching to using
73+ `pypi.org ` for uploads will give the follow error message::
74+
75+ Server response (410): This API is no longer supported, instead simply upload the file.
76+
77+ The solution is to skip the registration step, and proceed directly to
78+ uploading artifacts.
0 commit comments