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

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:30:57 -08:00 committed by GitHub
parent d8a72b4c5e
commit f7d17ac9f8
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);