-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Importlib #1018
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
Merged
Importlib #1018
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
7ff59b2
Add _bootsrap.py as frozen module
palaviv e88d6ac
Add init_importlib
palaviv 698044b
Add Module.__name__
palaviv f1af6b1
Include _bootstrap.py as str
palaviv f214588
Don't set __file__ for frozen modules
palaviv 0d9a066
Add sys.meta_path
palaviv 37b40c5
Add frozen _bootstrap_external.py
palaviv fbaff7f
Install external importers on init_importlib
palaviv a57f38b
Rename builtin io to _io
palaviv b0cccf3
Change os_details
palaviv 58d9d9d
Add sys.path_hooks
palaviv 7f61125
Use _bootstrap.py __import__
palaviv 2817214
Remove unused imports
palaviv 0e76dbb
Add needed methods to _thread
palaviv 5c53e58
Print frozen import file name in stacktrace
palaviv 6615e81
Collapse concat
palaviv fe0284a
Add new to objmodule and change __name__ to property
palaviv 375790e
objmodule should have a dict
palaviv c8248c3
Expose __name__ in __dict__
palaviv 5584733
Add sys.path_importer_cache
palaviv d9d0ea1
Fix os to _os in class
palaviv 5df05d4
Add script dir to sys.path
palaviv b567464
Add ModuleNotFoundError to builtins
palaviv 10828e0
Set sys.pycache_prefix to None
palaviv 8dec522
compile source may be bytes
palaviv 03735a6
Add optional parameters to compile
palaviv e1472f2
Add sys.dont_write_bytecode
palaviv 603ef1a
Support from_list
palaviv 0e320f9
Change comment to XXX
palaviv ea8e280
Simplify objmodule
palaviv 1de9f73
Optimize already loaded modules
palaviv 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from _io import * |
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
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
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 function name is slightly confusing with the existing function
builtin_import
in the filebuiltins.rs
. We should come up with some better name, preferably not having the the wordbuiltin
in it. Maybe something like internal, or baked in, or rust lib.