cpython/Lib/test/test_importlib
Eric Snow 08285d563e
bpo-45020: Identify which frozen modules are actually aliases. (gh-28655)
In the list of generated frozen modules at the top of Tools/scripts/freeze_modules.py, you will find that some of the modules have a different name than the module (or .py file) that is actually frozen. Let's call each case an "alias". Aliases do not come into play until we get to the (generated) list of modules in Python/frozen.c. (The tool for freezing modules, Programs/_freeze_module, is only concerned with the source file, not the module it will be used for.)

Knowledge of which frozen modules are aliases (and the identity of the original module) normally isn't important. However, this information is valuable when we go to set __file__ on frozen stdlib modules. This change updates Tools/scripts/freeze_modules.py to map aliases to the original module name (or None if not a stdlib module) in Python/frozen.c. We also add a helper function in Python/import.c to look up a frozen module's alias and add the result of that function to the frozen info returned from find_frozen().

https://bugs.python.org/issue45020
2021-10-05 11:26:37 -06:00
..
builtin
data
data01
data02
data03
extension
frozen bpo-45020: Identify which frozen modules are actually aliases. (gh-28655) 2021-10-05 11:26:37 -06:00
import_
namespace_pkgs
namespacedata01
partial
resources bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
source [codemod] Fix non-matching bracket pairs (GH-28473) 2021-09-22 01:09:00 +02:00
zipdata01
zipdata02
__init__.py
__main__.py
abc.py
fixtures.py
stubs.py
test_abc.py
test_api.py
test_compatibilty_files.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
test_contents.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
test_files.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
test_lazy.py
test_locks.py bpo-45229: Remove test_main in many tests (GH-28405) 2021-09-19 15:27:33 +03:00
test_main.py
test_metadata_api.py bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508) 2021-07-31 06:08:13 -07:00
test_namespace_pkgs.py
test_open.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
test_path.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
test_pkg_import.py
test_read.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
test_reader.py
test_resource.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00
test_spec.py
test_threaded_import.py bpo-45229: Remove test_main in many tests (GH-28405) 2021-09-19 15:27:33 +03:00
test_util.py
test_windows.py
test_zip.py
threaded_import_hangers.py
update-zips.py
util.py bpo-44771: Apply changes from importlib_resources 5.2.1 (GH-27436) 2021-07-29 21:05:05 -04:00