Regression: importlib.metadata.PathDistribution.requires raises AttributeError, name/version raises TypeError
>>> from importlib import metadata >>> d = metadata.PathDistribution.at('/tmp') >>> d.requires >>> d.requires is None True
>>> from importlib import metadata >>> d = metadata.PathDistribution.at('/tmp') >>> d.requires Traceback (most recent call last): File "<python-input-2>", line 1, in <module> d.requires File "/usr/lib64/python3.15/importlib/metadata/__init__.py", line 660, in requires reqs = self._read_dist_info_reqs() or self._read_egg_info_reqs() ~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib64/python3.15/importlib/metadata/__init__.py", line 664, in _read_dist_info_reqs return self.metadata.get_all('Requires-Dist') ^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get_all'
I believe this is a regression from 9b38c66 where the metadata property changed the type from _meta.PackageMetadata to _meta.PackageMetadata | None but other properties (here the requires property) do not account for it being None.