python / python/cpython

Builds Without HAVE_DYNAMIC_LOADING Set Still Expose Features and API Related to Dynamic Modules

未关闭
#122,950 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

3.14 extension-modules interpreter-core topic-importlib type-bug
主要语言
Python
星标
77.2k
派生
36k
PR 合并指标
PR 指标待抓取

描述

Bug report

Bug description:

When CPython is built without HAVE_DYNAMIC_LOADING set, we currently leave out a small handful of code in Python/import.c and Python/importdl.c. However, there is a bunch more that should probably be excluded (via #ifdef HAVE_DYNAMIC_LOADING):

  • some functions and constants in Python/importdl.c and Include/internal/pycore_importdl.h
  • some functions, constants, and state in Python/import.c and Include/internal/pycore_import.h
  • some code in Lib/importlib/_bootstrap_external.py
  • maybe some code in Objects/moduleobject.c
  • builds for Modules/Setup.stdlib
  • checks in Tools/build/check_extension_modules.py
  • modules listed by Tools/build/generate_stdlib_module_names.py

(Also see gh-122907.)

Getting this all correct would probably take a fair amount of effort. Perhaps the big question is would it be worth addressing all these cases?

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

检查 Python/import.c、Python/importdl.c、Include/internal/pycore_importdl.h、Include/internal/pycore_import.h、Lib/importlib/_bootstrap_external.py 和 Objects/moduleobject.c 中指定的动态加载路径,以及列出的 Tools/build 脚本和 Modules/Setup.stdlib。在考虑 gh-122907 的情况下,比较未设置 HAVE_DYNAMIC_LOADING 时的行为,并在定义一致排除动态模块 API 和功能意味着什么之前,确定完整范围。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
build-system
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。