From df9cc45bbdd8bb886055a26bc8bc21df5653aef3 Mon Sep 17 00:00:00 2001 From: ryanking13 Date: Tue, 19 Sep 2023 21:19:34 +0900 Subject: [PATCH] Copy index urls when setting --- micropip/_commands/index_urls.py | 2 +- micropip/_commands/install.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/micropip/_commands/index_urls.py b/micropip/_commands/index_urls.py index 60cc9b1..aae9cce 100644 --- a/micropip/_commands/index_urls.py +++ b/micropip/_commands/index_urls.py @@ -24,4 +24,4 @@ def set_index_urls(urls: list[str] | str) -> None: if isinstance(urls, str): urls = [urls] - package_index.INDEX_URLS = urls + package_index.INDEX_URLS = urls[:] diff --git a/micropip/_commands/install.py b/micropip/_commands/install.py index 155eab0..bc93c1f 100644 --- a/micropip/_commands/install.py +++ b/micropip/_commands/install.py @@ -127,7 +127,7 @@ async def install( wheel_base = Path(getsitepackages()[0]) if index_urls is None: - index_urls = package_index.INDEX_URLS + index_urls = package_index.INDEX_URLS[:] transaction = Transaction( ctx=ctx,