Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tools/please_pex/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 3.0.4
-------------
* Handle 'stub' modules that don't have a __spec__

Version 3.0.3
-------------
* Fix `importlib.resources` for some usages relating to packages in module_dir (#324)
Expand Down
2 changes: 1 addition & 1 deletion tools/please_pex/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3
3.0.4
7 changes: 4 additions & 3 deletions tools/please_pex/pex/plz.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ def create_module(self, spec):
# Carry over submodule_search_locations from the real module's spec, otherwise
# importlib.resources (which relies on it to find a package's files) breaks once
# the module's __spec__ gets overwritten with this one.
real_spec = module.__spec__
spec.submodule_search_locations = real_spec.submodule_search_locations
self._real_specs[spec.name] = real_spec
real_spec = getattr(module, "__spec__", None)
if real_spec is not None:
spec.submodule_search_locations = real_spec.submodule_search_locations
self._real_specs[spec.name] = real_spec
sys.modules[spec.name] = module
return module

Expand Down
Loading