Skip to content

Commit 6f5fae7

Browse files
authored
Note issues with Provides-Dist and Obsoletes-Dist (#513)
The design of Provides-Dist and Obsoletes-Dist was lifted pretty much directly from the design of Linux system package managers, without accounting for the fact that Linux distro repos are collaboratively maintained curated collections of packages with the ability to make repository wide changes, while PyPI is an open publishing platform with few practical restrictions other than size quotas and the default first-come-first-served policy on claiming names. As a result, tools generally don't pay any attention to them, and hence there also isn't much reason for package publishers to bother setting them.
1 parent b3bf60b commit 6f5fae7

1 file changed

Lines changed: 85 additions & 70 deletions

File tree

‎source/specifications/core-metadata.rst‎

Lines changed: 85 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -459,76 +459,6 @@ Examples::
459459
Requires-Dist: pywin32 >1.0; sys_platform == 'win32'
460460

461461

462-
Provides-Dist (multiple use)
463-
============================
464-
465-
.. versionadded:: 1.2
466-
.. versionchanged:: 2.1
467-
The field format specification was relaxed to accept the syntax used by
468-
popular publishing tools.
469-
470-
Each entry contains a string naming a Distutils project which
471-
is contained within this distribution. This field *must* include
472-
the project identified in the ``Name`` field, followed by the
473-
version : Name (Version).
474-
475-
A distribution may provide additional names, e.g. to indicate that
476-
multiple projects have been bundled together. For instance, source
477-
distributions of the ``ZODB`` project have historically included
478-
the ``transaction`` project, which is now available as a separate
479-
distribution. Installing such a source distribution satisfies
480-
requirements for both ``ZODB`` and ``transaction``.
481-
482-
A distribution may also provide a "virtual" project name, which does
483-
not correspond to any separately-distributed project: such a name
484-
might be used to indicate an abstract capability which could be supplied
485-
by one of multiple projects. E.g., multiple projects might supply
486-
RDBMS bindings for use by a given ORM: each project might declare
487-
that it provides ``ORM-bindings``, allowing other projects to depend
488-
only on having at most one of them installed.
489-
490-
A version declaration may be supplied and must follow the rules described
491-
in :doc:`version-specifiers`. The distribution's version number will be implied
492-
if none is specified.
493-
494-
This field may be followed by an environment marker after a semicolon.
495-
496-
Examples::
497-
498-
Provides-Dist: OtherProject
499-
Provides-Dist: AnotherProject (3.4)
500-
Provides-Dist: virtual_package; python_version >= "3.4"
501-
502-
503-
Obsoletes-Dist (multiple use)
504-
=============================
505-
506-
.. versionadded:: 1.2
507-
.. versionchanged:: 2.1
508-
The field format specification was relaxed to accept the syntax used by
509-
popular publishing tools.
510-
511-
Each entry contains a string describing a distutils project's distribution
512-
which this distribution renders obsolete, meaning that the two projects
513-
should not be installed at the same time.
514-
515-
Version declarations can be supplied. Version numbers must be in the
516-
format specified in :doc:`version-specifiers`.
517-
518-
This field may be followed by an environment marker after a semicolon.
519-
520-
The most common use of this field will be in case a project name
521-
changes, e.g. Gorgon 2.3 gets subsumed into Torqued Python 1.0.
522-
When you install Torqued Python, the Gorgon distribution should be
523-
removed.
524-
525-
Examples::
526-
527-
Obsoletes-Dist: Gorgon
528-
Obsoletes-Dist: OtherProject (<3.0)
529-
Obsoletes-Dist: Foo; os_name == "posix"
530-
531-
532462
Requires-Python
533463
===============
534464

@@ -633,6 +563,91 @@ It is legal to specify ``Provides-Extra:`` without referencing it in any
633563
``Requires-Dist:``.
634564

635565

566+
Rarely Used Fields
567+
==================
568+
569+
The fields in this section are currently rarely used, as their design
570+
was inspired by comparable mechanisms in Linux package management systems,
571+
and it isn't at all clear how tools should interpret them in the context
572+
of an open index server such as `PyPI <https://pypi.org>`__.
573+
574+
As a result, popular installation tools ignore them completely, which in
575+
turn means there is little incentive for package publishers to set them
576+
appropriately. However, they're retained in the metadata specification,
577+
as they're still potentially useful for informational purposes, and can
578+
also be used for their originally intended purpose in combination with
579+
a curated package repository.
580+
581+
582+
Provides-Dist (multiple use)
583+
----------------------------
584+
585+
.. versionadded:: 1.2
586+
.. versionchanged:: 2.1
587+
The field format specification was relaxed to accept the syntax used by
588+
popular publishing tools.
589+
590+
Each entry contains a string naming a Distutils project which
591+
is contained within this distribution. This field *must* include
592+
the project identified in the ``Name`` field, followed by the
593+
version : Name (Version).
594+
595+
A distribution may provide additional names, e.g. to indicate that
596+
multiple projects have been bundled together. For instance, source
597+
distributions of the ``ZODB`` project have historically included
598+
the ``transaction`` project, which is now available as a separate
599+
distribution. Installing such a source distribution satisfies
600+
requirements for both ``ZODB`` and ``transaction``.
601+
602+
A distribution may also provide a "virtual" project name, which does
603+
not correspond to any separately-distributed project: such a name
604+
might be used to indicate an abstract capability which could be supplied
605+
by one of multiple projects. E.g., multiple projects might supply
606+
RDBMS bindings for use by a given ORM: each project might declare
607+
that it provides ``ORM-bindings``, allowing other projects to depend
608+
only on having at most one of them installed.
609+
610+
A version declaration may be supplied and must follow the rules described
611+
in :doc:`version-specifiers`. The distribution's version number will be implied
612+
if none is specified.
613+
614+
This field may be followed by an environment marker after a semicolon.
615+
616+
Examples::
617+
618+
Provides-Dist: OtherProject
619+
Provides-Dist: AnotherProject (3.4)
620+
Provides-Dist: virtual_package; python_version >= "3.4"
621+
622+
623+
Obsoletes-Dist (multiple use)
624+
-----------------------------
625+
626+
.. versionadded:: 1.2
627+
.. versionchanged:: 2.1
628+
The field format specification was relaxed to accept the syntax used by
629+
popular publishing tools.
630+
631+
Each entry contains a string describing a distutils project's distribution
632+
which this distribution renders obsolete, meaning that the two projects
633+
should not be installed at the same time.
634+
635+
Version declarations can be supplied. Version numbers must be in the
636+
format specified in :doc:`version-specifiers`.
637+
638+
This field may be followed by an environment marker after a semicolon.
639+
640+
The most common use of this field will be in case a project name
641+
changes, e.g. Gorgon 2.3 gets subsumed into Torqued Python 1.0.
642+
When you install Torqued Python, the Gorgon distribution should be
643+
removed.
644+
645+
Examples::
646+
647+
Obsoletes-Dist: Gorgon
648+
Obsoletes-Dist: OtherProject (<3.0)
649+
Obsoletes-Dist: Foo; os_name == "posix"
650+
636651
----
637652

638653
.. [1] reStructuredText markup:

0 commit comments

Comments
 (0)