@@ -11,7 +11,6 @@ the new location.
11
11
12
12
This section covers how to migrate to the new PyPI.org for different tasks.
13
13
14
-
15
14
Uploading
16
15
---------
17
16
@@ -44,8 +43,36 @@ your upload tool's default URL.
44
43
If for some reason you're unable to upgrade the version of your tool to a
45
44
version that defaults to using PyPI.org, then you may edit ``~/.pypirc `` and
46
45
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
48
59
49
60
If you use TestPyPI, you must update your ``~/.pypirc `` to handle
50
61
TestPyPI's new location, by replacing ``https://testpypi.python.org/pypi ``
51
62
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