Skip to content
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

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix error message in tests
  • Loading branch information
encukou committed Sep 18, 2026
commit b290f31b008c880603eb985c7dec36afcd43491f
4 changes: 3 additions & 1 deletion Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ def test_create_module_from_initfunc(self):
"sys.modules[\"sp_pkg.sp_submod\"] is sp_pkg.sp_submod=True\n"
"\"sp_submod\" in sys.modules=False\n"
"ascii(mp.__name__)=\"'m\\\\xf6dul_mp'\" mp.executed='yes'\n"
"SystemError: 'initialization of m\\xf6dul_sp "
# The error shows the internal punycode-encoded name,
# which isn't ideal, but also not horrible.
"SystemError: 'initialization of mdul_sp_90a "
"did not return PyModuleDef'\n"
)

Expand Down