diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-15 22:08:44 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-15 22:08:44 (GMT) |
commit | 82f04e2dfdd2bdfef5bd94f8d6615ac0a1f620b4 (patch) | |
tree | a4bbb448ef69023dbccfb35fe8a2b78453c209a3 /Lib/importlib | |
parent | 6453e9ed0add5f60d150692cef4596702dcc3290 (diff) | |
download | cpython-82f04e2dfdd2bdfef5bd94f8d6615ac0a1f620b4.zip cpython-82f04e2dfdd2bdfef5bd94f8d6615ac0a1f620b4.tar.gz cpython-82f04e2dfdd2bdfef5bd94f8d6615ac0a1f620b4.tar.bz2 |
regrtest: Fix module.__path__
Issue #26538: libregrtest: Fix setup_tests() to keep module.__path__ type
(_NamespacePath), don't convert to a list.
Add _NamespacePath.__setitem__() method to importlib._bootstrap_external.
Diffstat (limited to 'Lib/importlib')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index ddb2456..5d63a1f 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -971,6 +971,9 @@ class _NamespacePath: def __iter__(self): return iter(self._recalculate()) + def __setitem__(self, index, path): + self._path[index] = path + def __len__(self): return len(self._recalculate()) |