Skip to content

Commit 84158ab

Browse files
committed
Replace repo URLs with defaults
1 parent abce5a7 commit 84158ab

2 files changed

Lines changed: 7 additions & 23 deletions

File tree

source/guides/using-testpypi.rst

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ https://test.pypi.org/account/register/ to register your account.
2323
Using TestPyPI with Twine
2424
-------------------------
2525

26-
You can upload your distributions to TestPyPI using :ref:`twine` by passing
27-
in the ``--repository-url`` flag
26+
You can upload your distributions to TestPyPI using :ref:`twine` by specifying
27+
the ``--repository`` flag
2828

2929
.. code::
3030
31-
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
32-
33-
The ``legacy`` in the URL above refers to the legacy API for PyPI, which may
34-
change as the Warehouse project progresses.
31+
$ twine upload --repository testpypi dist/*
3532
3633
You can see if your package has successfully uploaded by navigating to the URL
3734
``https://test.pypi.org/project/<sampleproject>`` where ``sampleproject`` is
@@ -59,29 +56,16 @@ you're testing has dependencies:
5956
Setting up TestPyPI in pypirc
6057
-----------------------------
6158

62-
If you want to avoid entering the TestPyPI url and your username
63-
you can configure TestPyPI in your ``$HOME/.pypirc``.
59+
If you want to avoid entering your username, you can configure TestPyPI in
60+
your ``$HOME/.pypirc``.
6461

6562
Create or modify ``$HOME/.pypirc`` with the following:
6663

6764
.. code::
6865
69-
[distutils]
70-
index-servers=
71-
pypi
72-
testpypi
73-
7466
[testpypi]
75-
repository: https://test.pypi.org/legacy/
7667
username: your testpypi username
7768
7869
7970
.. Warning:: Do not store passwords in the pypirc file.
8071
Storing passwords in plain text is never a good idea.
81-
82-
You can then tell :ref:`twine` to upload to TestPyPI by specifying the
83-
``--repository`` flag:
84-
85-
.. code::
86-
87-
$ twine upload --repository testpypi dist/*

source/tutorials/packaging-projects.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Once installed, run Twine to upload all of the archives under :file:`dist`:
261261

262262
.. code-block:: bash
263263
264-
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
264+
python3 -m twine upload --repository testpypi dist/*
265265
266266
You will be prompted for a username and password. For the username,
267267
use ``__token__``. For the password, use the token value, including
@@ -346,7 +346,7 @@ differences:
346346
main server.
347347
* Use ``twine upload dist/*`` to upload your package and enter your credentials
348348
for the account you registered on the real PyPI. Now that you're uploading
349-
the package in production, you don't need to specify ``--repository-url``; the
349+
the package in production, you don't need to specify ``--repository``; the
350350
package will upload to https://pypi.org/ by default.
351351
* Install your package from the real PyPI using ``pip install [your-package]``.
352352

0 commit comments

Comments
 (0)