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