File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,8 @@ present in that wheel's filename.
245245
246246It has 3 levels. The first level keys are variant labels, the second
247247level keys are namespaces, the third level are feature names, and the
248- third level values are lists of feature values.
248+ third level values are sets of feature values, converted to lists,
249+ sorted lexically.
249250
250251
251252Example
@@ -802,6 +803,10 @@ the variant metadata is mirrored in a JSON file published on the index.
802803This enables installers to obtain variant property mapping without
803804having to fetch individual wheels.
804805
806+ Since JSON format does not feature a set type, sets are represented as
807+ sorted lists. Sorting ensures that tools can safely use equality
808+ comparison over dictionaries.
809+
805810The variant ordering algorithm has been proposed with the assumption
806811that variant properties take precedence over Platform compatibility
807812tags, as they are primarily used to express user preferences. This
@@ -988,6 +993,11 @@ and Zanie Blue.
988993Change History
989994==============
990995
996+ - TO BE PUBLISHED
997+
998+ - Clarified that feature values in ``variants `` dictionary are sets,
999+ and that they ought to be sorted when serializing.
1000+
9911001- 17-Feb-2026
9921002
9931003 - Initial version, split from :pep: `817 ` draft.
You can’t perform that action at this time.
0 commit comments