diff --git a/source/specifications/dependency-specifiers.rst b/source/specifications/dependency-specifiers.rst index d66f77503..c330a0e17 100644 --- a/source/specifications/dependency-specifiers.rst +++ b/source/specifications/dependency-specifiers.rst @@ -457,15 +457,16 @@ DO NOT need to define these fields. The ``extra`` field is also special, as it expects set-like behaviour, but predates the addition of ``Set of strings`` as a defined marker field type. -Accordingly, ``extra == "name"`` in a dependency declaration is similar to -``"name" in extras``, while ``extra != "name"`` is similar to -``"name" not in extras``. For dependency marker evaluations, the set of extra -names used for these comparisons is the full set of requested extras for *that -particular package*, whether requested directly in a top level dependency -declaration, or indirectly in a transitive dependency declaration. Other -comparison operations on ``extra`` are not defined and publishing tools SHOULD -emit an error, index servers MAY disallow uploads containing such environment -markers, while locking and installation tools SHOULD evaluate them as False. +It only supports one operation, ``extra == "name"``, which is similar to +``"name" in extras``. ``extra != "name"`` SHOULD NOT be used anymore and MAY +be rejected or evaluated to false. For dependency marker evaluations, the set +of extra names used for these comparisons is the full set of requested extras +for *that particular package*, whether requested directly in a top level +dependency declaration, or indirectly in a transitive dependency declaration. +Other comparison operations on ``extra`` are not defined and publishing tools +SHOULD emit an error, index servers MAY disallow uploads containing such +environment markers, while locking and installation tools SHOULD evaluate them +as False. Unlike the newer ``extras`` field, environment markers using this field SHOULD be accepted by both publishing tools and index servers. Marker evaluation @@ -707,6 +708,8 @@ History work. [#marker_comparison_logic]_ - January 2026: fix outdated references to other documents that were inadvertently retained from :pep:`508` +- July 2026: Explain that ``extra != "name"`` is not (properly) supported + (https://discuss.python.org/t/ban-negative-extras-for-extras-marker/108022/24) References