Return the parsed metadata for this Distribution. The returned object will have keys that name the various bits of metadata per the `Core metadata specifications `_. Custom providers
(self)
| 520 | |
| 521 | @property |
| 522 | def metadata(self) -> _meta.PackageMetadata: |
| 523 | """Return the parsed metadata for this Distribution. |
| 524 | |
| 525 | The returned object will have keys that name the various bits of |
| 526 | metadata per the |
| 527 | `Core metadata specifications <https://packaging.python.org/en/latest/specifications/core-metadata/#core-metadata>`_. |
| 528 | |
| 529 | Custom providers may provide the METADATA file or override this |
| 530 | property. |
| 531 | |
| 532 | :raises MetadataNotFound: If no metadata file is present. |
| 533 | """ |
| 534 | |
| 535 | text = ( |
| 536 | self.read_text('METADATA') |
| 537 | or self.read_text('PKG-INFO') |
| 538 | # This last clause is here to support old egg-info files. Its |
| 539 | # effect is to just end up using the PathDistribution's self._path |
| 540 | # (which points to the egg-info file) attribute unchanged. |
| 541 | or self.read_text('') |
| 542 | ) |
| 543 | return self._assemble_message(self._ensure_metadata_present(text)) |
| 544 | |
| 545 | @staticmethod |
| 546 | def _assemble_message(text: str) -> _meta.PackageMetadata: |
no test coverage detected