镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

gh-158797: Update docs for test.support.import_helper - #158875

Open
DavidCEllis wants to merge 11 commits into
python:mainfrom
DavidCEllis:update-testsupport-docs
Open

DavidCEllis wants to merge 11 commits into
python:mainfrom
DavidCEllis:update-testsupport-docs

Conversation

@DavidCEllis

@DavidCEllis DavidCEllis commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds documentation for previously undocumented functions, classes and arguments in test.support.import_helper.

Additions:

  • add_module
  • add_package
  • create_module
  • ensure_module_imported
  • frozen_modules
  • isolated_modules
  • multi_interp_extensions_check
  • ready_to_import

New/renamed arguments:

  • CleanImport - added usefrozen keyword argument
  • forget - module_name -> modname to match code
  • import_fresh_module - added usefrozen, deprecated is keyword only
  • make_legacy_pyc - added allow_compile

Left for now:

module_restored is currently left undocumented as on attempting to document it I realised that I don't think all branches work as intended.

In documenting the missing functions and classes I found it difficult to discover appropriate functions and so have added some subheadings and regrouped the functions and classes by some sense of functionality. This puts things like unload and forget which are similar with slight differences together for instance.

@DavidCEllis

Copy link
Copy Markdown
Contributor Author

This is what I get for accidentally clicking the update button.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34949964 | 📁 Comparing 0170e1b against main (cfd6cf7)

  🔍 Preview build  

1 file changed
± library/test.html

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

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant