-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix submodule attributes and spec after deprecation (#4920)
* add `__spec__` to the wrapper module produced by deprecated_submodule and deprecate_attributes and make it proxy the spec of the original module. This is required for later submodule imports. * when deprecated_submodule and deprecate_attributes replace items in sys.modules update submodule attributes in their parents to be the same. * make deprecate_attributes more convenient by replacing the module argument with the absolute module name. Let it then handle sys.modules and attributes updates.
- Loading branch information
1 parent
9fb7e9c
commit 4f354ea
Showing
4 changed files
with
105 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters