Skip to content

bpo-40275: Add import_helper submodule in test.support#20794

Merged
vstinner merged 1 commit intopython:masterfrom
shihai1991:bpo_40275_import_helper
Jun 10, 2020
Merged

bpo-40275: Add import_helper submodule in test.support#20794
vstinner merged 1 commit intopython:masterfrom
shihai1991:bpo_40275_import_helper

Conversation

@shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Jun 10, 2020

remove the following functions, classes in import_helper:

  • import_module(), _ignore_deprecated_imports()
  • import_fresh_module(), _save_and_remove_module(), _save_and_block_module()
  • unload()
  • make_legacy_pyc()
  • forget()
  • CleanImport
  • DirsOnSysPath
  • modules_setup(), modules_cleanup()

https://bugs.python.org/issue40275

@shihai1991
Copy link
Member Author

@vstinner hI, victor. Should we leave DirsOnSysPath in support/init.py?
DirOnSysPath have no direct relation with import_module, right?

@vstinner
Copy link
Member

DirOnSysPath have no direct relation with import_module, right?

import uses sys.path, no? What's the sys.path purpose otherwise?
https://docs.python.org/dev/library/sys.html#sys.path

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM. But I'm waiting for your feedback on DirsOnSysPath.

@shihai1991
Copy link
Member Author

LGTM. But I'm waiting for your feedback on DirsOnSysPath.

Ok, from the docs: A list of strings that specifies the search path for modules. so it make sense.

@vstinner vstinner merged commit 7f888c7 into python:master Jun 10, 2020
@shihai1991
Copy link
Member Author

thanks, victor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants