@@ -11,14 +11,14 @@ class BasicMetadata:
1111 # Popualted from Requires-Dist or requires.txt
1212 reqs : Sequence [str ]
1313 # Populated from Provides-Extra
14- provides_extra : set [str ]
14+ provides_extra : frozenset [str ]
1515
1616 @classmethod
1717 def from_metadata (cls , metadata : bytes ) -> BasicMetadata :
1818 msg = message_from_string (metadata .decode ("utf-8" ))
1919 return BasicMetadata (
2020 msg .get_all ("Requires-Dist" ) or (),
21- set (msg .get_all ("Provides-Extra" ) or ()),
21+ frozenset (msg .get_all ("Provides-Extra" ) or ()),
2222 )
2323
2424 @classmethod
@@ -33,7 +33,7 @@ def from_sdist_pkg_info_and_requires(
3333 )
3434
3535
36- def convert_sdist_requires (data : str ) -> tuple [list [str ], set [str ]]:
36+ def convert_sdist_requires (data : str ) -> tuple [tuple [str , ... ], frozenset [str ]]:
3737 # This is reverse engineered from looking at a couple examples, but there
3838 # does not appear to be a formal spec. Mentioned at
3939 # https://setuptools.readthedocs.io/en/latest/formats.html#requires-txt
@@ -64,4 +64,4 @@ def convert_sdist_requires(data: str) -> tuple[list[str], set[str]]:
6464 lst .append (f"{ line } ; { current_markers } " )
6565 else :
6666 lst .append (line )
67- return lst , extras
67+ return tuple ( lst ), frozenset ( extras )
0 commit comments