Make __hello_only__ a frozen-only alias of __hello__ (#7160)

Remove __hello_only__.py source file and its symlink. Register
__hello_only__ as a frozen module alias reusing __hello__ bytecode,
matching the behavior where origname is None (no source file).
This commit is contained in:
Jeong, YunWon authored and GitHub committed 2026-02-15 22:25:28 +09:00
1 parent 9aa6f07006
commit a760f337a0
3 files changed
+7 -3

No files matched your search

-2
View File
@@ -1,2 +0,0 @@
initialized = True
print("Hello world!")
@@ -1 +0,0 @@
../../../../Lib/__hello_only__.py
+7
View File
@@ -491,6 +491,13 @@ fn core_frozen_inits() -> impl Iterator<Item = (&'static str, FrozenModule)> {
package: false,
},
));
entries.push((
"__hello_only__",
FrozenModule {
code: hello_code,
package: false,
},
));
}
if let Some(code) = entries
.iter()