From 7547453db4baee1723191022e759c51800eb7283 Mon Sep 17 00:00:00 2001 From: Herrtian <70463940+Herrtian@users.noreply.github.com> Date: Tue, 12 May 2026 16:10:56 +0200 Subject: [PATCH 1/2] Mention local version upload restriction --- source/guides/distributing-packages-using-setuptools.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/guides/distributing-packages-using-setuptools.rst b/source/guides/distributing-packages-using-setuptools.rst index bf4227aaee..fed5742b9c 100644 --- a/source/guides/distributing-packages-using-setuptools.rst +++ b/source/guides/distributing-packages-using-setuptools.rst @@ -511,6 +511,10 @@ distribution file(s) to upload. is cleaned on a semi regular basis. See :ref:`using-test-pypi` on how to setup your configuration in order to use it. +.. note:: Public package indexes such as PyPI do not allow + :ref:`local version identifiers `. Use a public + version identifier before uploading distributions to PyPI. + .. warning:: In other resources you may encounter references to using ``python setup.py register`` and ``python setup.py upload``. These methods of registering and uploading a package are **strongly discouraged** as it may From 75bb49e2804a1706b5adb15024978fc0ae1bb52a Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Thu, 26 Nov 2026 11:38:34 +0000 Subject: [PATCH 2/2] Restrict the local-version upload warning to PyPI Other package indexes may accept local version identifiers; keep the warning specific to PyPI's upload policy. --- source/tutorials/packaging-projects.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tutorials/packaging-projects.rst b/source/tutorials/packaging-projects.rst index 78061fcb06..531fb19b23 100644 --- a/source/tutorials/packaging-projects.rst +++ b/source/tutorials/packaging-projects.rst @@ -508,7 +508,7 @@ like this tutorial. :ref:`Trusted Publishing ` instead of storing a long-lived API token. The linked guide shows how to set this up with GitHub Actions. -.. note:: Public package indexes such as PyPI do not allow +.. note:: PyPI does not allow :ref:`local version identifiers `. Use a public version identifier before uploading distributions to PyPI.