Skip to content

Commit 33d7ae5

Browse files
dstufftncoghlan
authored andcommitted
Add a document on migrating uploads to PyPI.org (pypa#339)
1 parent a98461a commit 33d7ae5

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

source/guides/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ introduction to packaging, see :doc:`/tutorials/index`.
2020
creating-and-discovering-plugins
2121
index-mirrors-and-caches
2222
hosting-your-own-index
23+
migrating-to-pypi-org
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. _`Migrating to PyPI.org`:
2+
3+
Migrating to PyPI.org
4+
=====================
5+
6+
PyPI.org is a new, rewritten version of PyPI that is replacing the legacy code
7+
base located at pypi.python.org. As it becomes the default, and eventually only,
8+
version of PyPI people are expected to interact with, there will be a transition
9+
period where tooling and processes are expected to need to update to deal with
10+
the new location.
11+
12+
This section covers how to migrate to the new PyPI.org for different tasks.
13+
14+
15+
Uploading
16+
---------
17+
18+
The recommended way to migrate to PyPI.org for uploading is to ensure that you
19+
are using a new enough version of the upload tools. That would be twine v1.8.0+
20+
(recommneded tool), Python 3.4.6+, Python 3.5.3+, Python 3.6+, 2.7.13+, or
21+
setuptools 27+.
22+
23+
In addition to ensuring you're on a new enough version of the tool for the
24+
tool's default to have switched. You must also make sure that you have not
25+
configured the tool to override it' default value. Typically this is configured
26+
in a file located at ``~/.pypirc``. If you see a file like:
27+
28+
29+
.. code::
30+
31+
[distutils]
32+
index-servers =
33+
pypi
34+
35+
[pypi]
36+
repository:https://pypi.python.org/pypi
37+
username:yourusername
38+
password:yourpassword
39+
40+
41+
Then simply delete the line starting with ``repository`` and you will utilize
42+
the default version of your upload tool.
43+
44+
If for some reason you're unable to upgrade the version of your tool to a
45+
version that defaults to using PyPI.org, then you may edit ``~/.pypirc`` and
46+
include the ``repository:`` line, but use the value
47+
``https://upload.pypi.org/legacy/`` instead.
48+
49+
In addition to regular PyPI, you must also update your ``~/.pypirc`` to handle
50+
TestPyPI if you're using it. For that you must edit your ``~/.pypirc`` to
51+
replace ``https://testpypi.python.org/pypi`` with
52+
``https://test.pypi.org/legacy/``.

0 commit comments

Comments
 (0)