Move invalidate_caches to the end of micropip.install (#2844)

This commit is contained in:
Hood Chatham 2022-07-05 23:32:45 -07:00 committed by GitHub
parent d8ae3cd1e0
commit 14d10e203a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,6 @@ async def install(
A ``Future`` that resolves to ``None`` when all packages have been
downloaded and installed.
"""
importlib.invalidate_caches()
ctx = default_environment()
if isinstance(requirements, str):
requirements = [requirements]
@ -575,6 +574,7 @@ async def install(
wheel_promises.append(wheel.install(wheel_base))
await gather(*wheel_promises)
importlib.invalidate_caches()
def _generate_package_hash(data: IO[bytes]) -> str: