-
Notifications
You must be signed in to change notification settings - Fork 184
Improve dynamic module recognition #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ogrisel
merged 20 commits into
cloudpipe:master
from
pierreglaser:fix-pickling-submodule-in-sharedobject-file
Jun 8, 2020
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
809848e
use a full-blown test package when testing
pierreglaser 081133d
rename _is_importable_by_name -> _is_importable
pierreglaser 0e47f38
factor out a tiny _get_parent(module) utility
pierreglaser f4d9aa7
check for module importability rather than dynamism
pierreglaser 57c2d97
flag submodules of extension modules as importable
pierreglaser 2f3c738
fixup! check for module importability rather than dynamism
pierreglaser 53998c1
rename _get_parent ->_get_parent_module_or_package
pierreglaser c29408c
remove stale pytest pragma
pierreglaser 4828874
raise a TypeError when a type mismatch happens
pierreglaser da60d2d
test nested importable dynamic submodules.
pierreglaser 504b093
add more test cases
pierreglaser f9dd915
[WIP] simplify importability detection
pierreglaser 5c86635
remove stale code
pierreglaser e31d415
simplify module importability detection
pierreglaser 420c4ad
fixup! simplify module importability detection
pierreglaser a74bd9e
remove unused function
pierreglaser 4d0f7cb
CI trigger
pierreglaser 6f899b6
CI trigger
pierreglaser 988e4ab
Apply suggestions from code review
ogrisel a080dd9
fill changelog
pierreglaser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably be named to
_make_dynamic_moduleas we actually do not import the module at all.We should still keep
dynamic_subimportas an alias for_make_dynamic_moduleto preserve backward compat with old pickle files.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
subimportfunction could also be renamed to_import_moduleto be more explicit. But we would also need to keep an alias namedsubimportpointing to_import_modulefor backward compat as well.