Skip to content

Commit

Permalink
Defer import of zipp
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Aug 27, 2024
1 parent f9a91a1 commit 76eebe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
from itertools import starmap
from typing import Any, Iterable, List, Mapping, Match, Optional, Set, cast

from zipp.compat.overlay import zipfile

from . import _meta
from ._collections import FreezableDefaultDict, Pair
from ._compat import (
Expand Down Expand Up @@ -777,6 +775,8 @@ def children(self):
return []

def zip_children(self):
from zipp.compat.overlay import zipfile

zip_path = zipfile.Path(self.root)
names = zip_path.root.namelist()
self.joinpath = zip_path.joinpath
Expand Down

0 comments on commit 76eebe0

Please sign in to comment.