Skip to content

Remove old import #1102

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 4 commits into from
Jul 4, 2019
Merged

Remove old import #1102

merged 4 commits into from
Jul 4, 2019

Conversation

palaviv
Copy link
Contributor

@palaviv palaviv commented Jul 3, 2019

No description provided.

@palaviv palaviv mentioned this pull request Jul 3, 2019
import_frozen(vm, module_name)
} else if vm.stdlib_inits.borrow().contains_key(module_name) {
import_builtin(vm, module_name)
} else if cfg!(feature = "rustpython-compiler") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of this feature flag was to check if rustpython was built with bytecode compiler support. If not, the module cannot be loaded from disc. I think importlib.py has a similar mechanism. Please refer to the function imp_exec_builtin in imp.rs. Maybe the logic deleted here, can be replicated over there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the external_importers use compile now. So I changed init_importlib to not install them if there is not compiler.

@coolreader18 coolreader18 merged commit f8e8a12 into RustPython:master Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants