Skip to content

Commit 735c291

Browse files
authored
Merge branch 'main' into remove-setuptools-wheel-upgrade
2 parents f98314a + 92fa5d8 commit 735c291

12 files changed

Lines changed: 85 additions & 125 deletions

source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@
156156
r"https://click\.palletsprojects\.com/.*",
157157
r"https://typer\.tiangolo\.com/.*",
158158
r"https://www.npmjs.com/.*",
159+
r"https://docutils\.sourceforge\.io/.*",
160+
# Temporarily ignored due to expired TLS cert.
161+
# Ref: https://github.com/pypa/packaging.python.org/issues/1998
162+
r"https://blog\.ganssle\.io/.*",
159163
]
160164
linkcheck_retries = 5
161165
# Ignore anchors for common targets when we know they likely won't be found

source/discussions/versioning.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ examples of version numbers [#version-examples]_:
2727
- A post-release of an alpha release (possible, but discouraged): ``1.2.0a1.post1``
2828
- A simple version with only two components: ``23.12``
2929
- A simple version with just one component: ``42``
30-
- A version with an epoch: ``1!1.0``
30+
- A version with an epoch (discouraged): ``1!1.0``
3131

3232
Projects can use a cycle of pre-releases to support testing by their users
3333
before a final release. In order, the steps are: alpha releases, beta releases,
@@ -46,13 +46,14 @@ notes. They should not be used for bug fixes; these should be done with a new
4646
final release (e.g., incrementing the third component when using semantic
4747
versioning).
4848

49-
Finally, epochs, a rarely used feature, serve to fix the sorting order when
50-
changing the versioning scheme. For example, if a project is using calendar
51-
versioning, with versions like 23.12, and switches to semantic versioning, with
52-
versions like 1.0, the comparison between 1.0 and 23.12 will go the wrong way.
53-
To correct this, the new version numbers should have an explicit epoch, as in
54-
"1!1.0", in order to be treated as more recent than the old version numbers.
55-
49+
Finally, epochs were intended to fix the sorting order when changing the
50+
versioning scheme. For example, if a project was using calendar versioning, with
51+
versions like ``23.12``, and switched to semantic versioning, with versions like
52+
``1.0``, the comparison between ``1.0`` and ``23.12`` would go the wrong way. To
53+
correct this, the new version numbers would have an explicit epoch, as in
54+
``1!1.0``, in order to be treated as more recent than the old version numbers.
55+
However, this is discouraged, and it is preferable to use a higher version
56+
number that is unlikely to cause user confusion, such as ``100.0``.
5657

5758

5859
Semantic versioning vs. calendar versioning

source/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Glossary
1414

1515
Build Backend
1616

17-
A library that takes a source tree
17+
A library that takes a :term:`source tree <Project Source Tree>`
1818
and builds a :term:`source distribution <Source Distribution (or "sdist")>` or
1919
:term:`built distribution <Built Distribution>` from it.
2020
The build is delegated to the backend by a

source/guides/analyzing-pypi-package-downloads.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,14 @@ Usage:
333333
The `pandas-gbq`_ project allows for accessing query results via `Pandas`_.
334334

335335

336+
``ClickPy``
337+
-----------
338+
339+
The `ClickPy`_ project provides a public application to visualize download
340+
statistics, with free direct SQL access to the underlying open-source
341+
`ClickHouse`_ database, updated daily.
342+
343+
336344
References
337345
==========
338346

@@ -346,3 +354,5 @@ References
346354
.. _google-cloud-bigquery: https://cloud.google.com/bigquery/docs/reference/libraries
347355
.. _pandas-gbq: https://pandas-gbq.readthedocs.io/en/latest/
348356
.. _Pandas: https://pandas.pydata.org/
357+
.. _ClickHouse: https://github.com/ClickHouse/ClickHouse
358+
.. _Clickpy: https://clickpy.clickhouse.com/

source/guides/multi-version-installs.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,3 @@ time, but that approach does mean that standard command line invocations of
3737
the affected tools can't be used - it's necessary to write a custom
3838
wrapper script or use ``python3 -c '<command>'`` to invoke the application's
3939
main entry point directly.
40-
41-
Refer to the `pkg_resources documentation
42-
<https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects>`__
43-
for more details.

source/guides/packaging-namespace-packages.rst

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ Legacy namespace packages
159159

160160
These two methods, that were used to create namespace packages prior to :pep:`420`,
161161
are now considered to be obsolete and should not be used unless you need compatibility
162-
with packages already using this method. Also, :doc:`pkg_resources <setuptools:pkg_resources>`
163-
has been deprecated.
162+
with packages already using one of these methods.
164163

165164
To migrate an existing package, all packages sharing the namespace must be migrated simultaneously.
166165

@@ -176,7 +175,7 @@ pkgutil-style namespace packages
176175
Python 2.3 introduced the :doc:`pkgutil <python:library/pkgutil>` module and the
177176
:py:func:`python:pkgutil.extend_path` function. This can be used to declare namespace
178177
packages that need to be compatible with both Python 2.3+ and Python 3. This
179-
is the recommended approach for the highest level of compatibility.
178+
was the recommended approach for the highest level of compatibility.
180179

181180
To create a pkgutil-style namespace package, you need to provide an
182181
:file:`__init__.py` file for the namespace package:
@@ -216,10 +215,18 @@ in the `pkgutil namespace example project`_.
216215
pkg_resources-style namespace packages
217216
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218217

219-
:doc:`Setuptools <setuptools:index>` provides the `pkg_resources.declare_namespace`_ function and
218+
.. warning::
219+
220+
The information in this section is obsolete and is no longer functional
221+
(as of Setuptools 82.0.0). It is only retained for historical reference.
222+
223+
``pkg_resources`` has been deprecated and was fully removed in Setuptools 82.0.0.
224+
225+
:doc:`Setuptools <setuptools:index>` previously provided the ``pkg_resources.declare_namespace`` function and
220226
the ``namespace_packages`` argument to :func:`~setuptools.setup`. Together
221-
these can be used to declare namespace packages. While this approach is no
222-
longer recommended, it is widely present in most existing namespace packages.
227+
these could be used to declare namespace packages. While this approach is no
228+
longer supported, it may still be encountered in environments using older
229+
``setuptools`` versions.
223230
If you are creating a new distribution within an existing namespace package that
224231
uses this method then it's recommended to continue using this as the different
225232
methods are not cross-compatible and it's not advisable to try to migrate an
@@ -281,11 +288,3 @@ to :func:`~setuptools.setup` in :file:`setup.py`. For example:
281288
packages=find_packages()
282289
namespace_packages=['mynamespace']
283290
)
284-
285-
A complete working example of two pkg_resources-style namespace packages can be found
286-
in the `pkg_resources namespace example project`_.
287-
288-
.. _pkg_resources.declare_namespace:
289-
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#namespace-package-support
290-
.. _pkg_resources namespace example project:
291-
https://github.com/pypa/sample-namespace-packages/tree/master/pkg_resources

source/guides/writing-pyproject-toml.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ A list of PyPI classifiers that apply to your project. Check the
413413

414414
.. code-block:: toml
415415
416+
[project]
416417
classifiers = [
417418
# How mature is this project? Common values are
418419
# 3 - Alpha

source/shared/build-backend-tabs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@
3838
.. code-block:: toml
3939
4040
[build-system]
41-
requires = ["uv_build >= 0.9.26, <0.10.0"]
41+
requires = ["uv_build >= 0.10.7, <0.11.0"]
4242
build-backend = "uv_build"

source/specifications/binary-distribution-format.rst

Lines changed: 10 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -240,18 +240,17 @@ The .dist-info directory
240240
secure hashes. Unlike PEP 376, every file except RECORD, which
241241
cannot contain a hash of itself, must include its hash. The hash
242242
algorithm must be sha256 or better; specifically, md5 and sha1 are
243-
not permitted, as signed wheel files rely on the strong hashes in
244-
RECORD to validate the integrity of the archive.
243+
not permitted.
245244
#. PEP 376's INSTALLER and REQUESTED are not included in the archive.
246-
#. RECORD.jws is used for digital signatures. It is not mentioned in
247-
RECORD.
248-
#. RECORD.p7s is allowed as a courtesy to anyone who would prefer to
249-
use S/MIME signatures to secure their wheel files. It is not
250-
mentioned in RECORD.
245+
#. RECORD.jws and RECORD.p7s are deprecated. Where they are still
246+
used, neither RECORD.jws nor RECORD.p7s are mentioned in RECORD.
247+
Build backends and other tools must not add them to wheels anymore,
248+
installers should be aware that these files may still be part of
249+
some wheels.
251250
#. During extraction, wheel installers verify all the hashes in RECORD
252-
against the file contents. Apart from RECORD and its signatures,
253-
installation will fail if any file in the archive is not both
254-
mentioned and correctly hashed in RECORD.
251+
against the file contents. Apart from RECORD, RECORD.jws and
252+
RECORD.p7s, installation will fail if any file in the archive is not
253+
both mentioned and correctly hashed in RECORD.
255254

256255
Subdirectories in :file:`.dist-info/`
257256
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -300,52 +299,6 @@ documentation and so forth from the distribution. During installation the
300299
contents of these subdirectories are moved onto their destination paths.
301300

302301

303-
Signed wheel files
304-
------------------
305-
306-
Wheel files include an extended RECORD that enables digital
307-
signatures. PEP 376's RECORD is altered to include a secure hash
308-
``digestname=urlsafe_b64encode_nopad(digest)`` (urlsafe base64
309-
encoding with no trailing = characters) as the second column instead
310-
of an md5sum. All possible entries are hashed, including any
311-
generated files such as .pyc files, but not RECORD which cannot contain its
312-
own hash. For example::
313-
314-
file.py,sha256=AVTFPZpEKzuHr7OvQZmhaU3LvwKz06AJw8mT\_pNh2yI,3144
315-
distribution-1.0.dist-info/RECORD,,
316-
317-
The signature file(s) RECORD.jws and RECORD.p7s are not mentioned in
318-
RECORD at all since they can only be added after RECORD is generated.
319-
Every other file in the archive must have a correct hash in RECORD
320-
or the installation will fail.
321-
322-
If JSON web signatures are used, one or more JSON Web Signature JSON
323-
Serialization (JWS-JS) signatures is stored in a file RECORD.jws adjacent
324-
to RECORD. JWS is used to sign RECORD by including the SHA-256 hash of
325-
RECORD as the signature's JSON payload:
326-
327-
.. code-block:: json
328-
329-
{ "hash": "sha256=ADD-r2urObZHcxBW3Cr-vDCu5RJwT4CaRTHiFmbcIYY" }
330-
331-
(The hash value is the same format used in RECORD.)
332-
333-
If RECORD.p7s is used, it must contain a detached S/MIME format signature
334-
of RECORD.
335-
336-
A wheel installer is not required to understand digital signatures but
337-
MUST verify the hashes in RECORD against the extracted file contents.
338-
When the installer checks file hashes against RECORD, a separate signature
339-
checker only needs to establish that RECORD matches the signature.
340-
341-
See
342-
343-
- https://datatracker.ietf.org/doc/html/rfc7515
344-
- https://datatracker.ietf.org/doc/html/draft-jones-json-web-signature-json-serialization-01
345-
- https://datatracker.ietf.org/doc/html/rfc7517
346-
- https://datatracker.ietf.org/doc/html/draft-jones-jose-json-private-key-01
347-
348-
349302
FAQ
350303
===
351304

@@ -361,34 +314,6 @@ Wheel defines a .data directory. Should I put all my data there?
361314
in *wheel's* ``.data`` directory.
362315

363316

364-
Why does wheel include attached signatures?
365-
-------------------------------------------
366-
367-
Attached signatures are more convenient than detached signatures
368-
because they travel with the archive. Since only the individual files
369-
are signed, the archive can be recompressed without invalidating
370-
the signature or individual files can be verified without having
371-
to download the whole archive.
372-
373-
374-
Why does wheel allow JWS signatures?
375-
------------------------------------
376-
377-
The JOSE specifications of which JWS is a part are designed to be easy
378-
to implement, a feature that is also one of wheel's primary design
379-
goals. JWS yields a useful, concise pure-Python implementation.
380-
381-
382-
Why does wheel also allow S/MIME signatures?
383-
--------------------------------------------
384-
385-
S/MIME signatures are allowed for users who need or want to use
386-
existing public key infrastructure with wheel.
387-
388-
Signed packages are only a basic building block in a secure package
389-
update system. Wheel only provides the building block.
390-
391-
392317
What's the deal with "purelib" vs. "platlib"?
393318
---------------------------------------------
394319

@@ -465,6 +390,7 @@ History
465390
:pep:`639`.
466391
- January 2025: Clarified that name and version needs to be normalized for
467392
``.dist-info`` and ``.data`` directories.
393+
- January 2026: Deprecate RECORD.jws and RECORD.p7s :pep:`815`.
468394

469395

470396
Appendix

source/specifications/pypirc.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ indexes <Package Index>` (referred to here as "repositories"), so that you don't
1010
have to enter the URL, username, or password whenever you upload a package with
1111
:ref:`twine` or :ref:`flit`.
1212

13+
The :file:`.pypirc` file **SHOULD** be UTF-8 encoded.
14+
15+
Tools that read or write :file:`.pypirc` files may not function correctly
16+
if another character encoding is used.
17+
1318
The format (originally defined by the :ref:`distutils` package) is:
1419

1520
.. code-block:: ini

0 commit comments

Comments
 (0)