| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| """ | ||
| Compatibility layer with stdlib. | ||
| Only needed when distributing via PyPI/3rd-party package. | ||
| """ | ||
|
|
||
| import sys | ||
| from typing import TYPE_CHECKING, List, Union | ||
|
|
||
| if TYPE_CHECKING: | ||
| # Avoid circular imports | ||
|
|
||
| from importlib import metadata as _legacy | ||
|
|
||
| from typing_extensions import TypeAlias | ||
|
|
||
| from .. import Distribution, PackagePath, _meta | ||
|
|
||
| if sys.version_info >= (3, 10): | ||
| from importlib.metadata import PackageMetadata as _legacy_Metadata | ||
| else: | ||
| from email.message import Message as _legacy_Metadata | ||
|
|
||
| _PackageMetadataOrLegacy: TypeAlias = Union[_legacy_Metadata, _meta.PackageMetadata] | ||
|
Comment thread
jaraco marked this conversation as resolved.
|
||
| _DistributionOrLegacy: TypeAlias = Union[_legacy.Distribution, Distribution] | ||
| _List_PackagePathOrLegacy: TypeAlias = Union[ | ||
| List[_legacy.PackagePath], List[PackagePath] | ||
| ] | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.