Skip to content

Guard typing imports #6133

Description

@chlowell

typing isn't in azure-core's install_requires and isn't part of 2.7's standard library, so the first from typing import ... can raise on 2.7. Fix would be to either take the dependency on typing or guard imports e.g.:

try:
    from typing import TYPE_CHECKING
except ImportError:
    TYPE_CHECKING = False

if TYPE_CHECKING:
    # pylint:disable=unused-import
    from typing import Any, Mapping, Optional, Type

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.CosmosEvent HubsKeyVaultStorageStorage Service (Queues, Blobs, Files)blocking-releaseBlocks release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions