Skip to content

Commit 326ba25

Browse files
authored
Note removal of explicit registration API (pypa#347)
After reconfiguring clients to use `pypi.org` for uploads, any explicit `register` calls will need to be skipped, as the new API doesn't allow them.
1 parent 7ea6868 commit 326ba25

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

source/guides/migrating-to-pypi-org.rst

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ the new location.
1111

1212
This section covers how to migrate to the new PyPI.org for different tasks.
1313

14-
1514
Uploading
1615
---------
1716

@@ -44,8 +43,36 @@ your upload tool's default URL.
4443
If for some reason you're unable to upgrade the version of your tool to a
4544
version that defaults to using PyPI.org, then you may edit ``~/.pypirc`` and
4645
include 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
5061
TestPyPI's new location, by replacing ``https://testpypi.python.org/pypi``
5162
with ``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

Comments
 (0)