mirror of
https://github.com/python/cpython.git
synced 2025-12-01 23:32:16 +00:00
* Reapply "gh-132947: Apply changes from importlib_metadata 8.7 (#137885)" (#137924)
This reverts commit 3706ef66ef.
* Skip the triggering test on buildbots only.
15 lines
367 B
Python
15 lines
367 B
Python
import functools
|
|
import typing
|
|
|
|
from ._meta import PackageMetadata
|
|
|
|
md_none = functools.partial(typing.cast, PackageMetadata)
|
|
"""
|
|
Suppress type errors for optional metadata.
|
|
|
|
Although Distribution.metadata can return None when metadata is corrupt
|
|
and thus None, allow callers to assume it's not None and crash if
|
|
that's the case.
|
|
|
|
# python/importlib_metadata#493
|
|
"""
|