FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-157384: Unify `_Py_ext_module_loader_info` initialization by encukou · Pull Request #157758 · python/cpython · GitHub

Repository navigation

Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
238cdb7
gh-157384: Set package context in PyImport_CreateModuleFromInitfunc()
itamaro Sep 12, 2026
1376710
gh-157384: Accept non-ASCII names in PyImport_CreateModuleFromInitfunc()
itamaro Sep 12, 2026
63eb6bf
Remove _Py_ext_module_loader_info_init_for_core
encukou Sep 18, 2026
fb0b332
Replace the `newcontext` string with a boolean
encukou Sep 18, 2026
d226a2c
Unify module loader info initialization
encukou Sep 18, 2026
76c73aa
Remove bool needs_swapcontext entirely
encukou Sep 18, 2026
cc5b73f
Gotta have a spec if there's no name & if we need origin
encukou Sep 18, 2026
1243838
Leave getattr(spec, "name") to info_init, if we don't have the name a…
encukou Sep 18, 2026
b797ab6
Use _Py_ID for static string objects
encukou Sep 18, 2026
1e4bb6c
Fix check for empty name
encukou Sep 18, 2026
3a97ca3
Pedantic fix for condition for setting info.origin
encukou Sep 18, 2026
902073b
Put newcontext back, for subinterpreter safety
encukou Sep 18, 2026
b290f31
Fix error message in tests
encukou Sep 18, 2026
96621eb
Use PyUnicode_IS_ASCII in get_encoded_name
encukou Sep 18, 2026
18b96bb
Merge in the main branch to refresh generated code
encukou Sep 18, 2026
ac44362
Refcount fix
encukou Sep 18, 2026
d9ca232
Remove unnecessary check
encukou Sep 18, 2026
fd07130
Use PyObject_VectorcallMethod to call replace
encukou Sep 18, 2026
a72f9b8
Merge in the main branch
encukou Oct 20, 2026
502e569
Fixups
encukou Oct 20, 2026
689b9b5
Use nicer names for nonascii test modules
encukou Oct 20, 2026
4fd51b8
Merge in the main branch
encukou Oct 20, 2026
dbc56b0
Handle missing origin
encukou Oct 20, 2026
6b2d3bd
Merge in the main branch
encukou Oct 22, 2026
2e4e587
Always replace '-' by '_'
encukou Oct 22, 2026
e53e903
Remove redundant set of newcontext
encukou Oct 22, 2026
File filter

Filter by extension

Filter by extension .c  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
Pedantic fix for condition for setting info.origin
  • Loading branch information
encukou committed Sep 18, 2026
commit 3a97ca31b75071a668aa00445dad8f35ea05c714
2 changes: 1 addition & 1 deletion Python/importdl.c
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
Expand Up @@ -137,7 +137,7 @@ _Py_ext_module_loader_info_init(struct _Py_ext_module_loader_info *p_info,
goto error;
}

if (origin != _Py_ext_module_origin_BUILTIN) {
if (origin == _Py_ext_module_origin_DYNAMIC) {
assert(spec != NULL);
info.filename = PyObject_GetAttr(spec, &_Py_ID(origin));
if (info.filename == NULL) {
Expand Down

Back | FazBrowse Home | New Git URL