[3.13] gh-140011: Delete importdl assertion that prevents importing embedded modules from packages (GH-141605) (#141987)

gh-140011: Delete importdl assertion that prevents importing embedded modules from packages (GH-141605)

(cherry picked from commit 27f62eb711)
This commit is contained in:
Itamar Oren 2025-11-28 23:31:11 -08:00 committed by GitHub
parent 09ceaa606a
commit 385688d4b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 211 additions and 2 deletions

View file

@ -175,7 +175,6 @@ _Py_ext_module_loader_info_init_for_builtin(
PyObject *name)
{
assert(PyUnicode_Check(name));
assert(PyUnicode_FindChar(name, '.', 0, PyUnicode_GetLength(name), -1) == -1);
assert(PyUnicode_GetLength(name) > 0);
PyObject *name_encoded = PyUnicode_AsEncodedString(name, "ascii", NULL);