Skip to content

Commit 7103865

Browse files
committed
Remove module.frozendict()
1 parent 4eeff1c commit 7103865

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

Lib/importlib/_bootstrap_external.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,6 @@ def exec_module(self, module):
761761
raise ImportError(f'cannot load module {module.__name__!r} when '
762762
'get_code() returns None')
763763
_bootstrap._call_with_frames_removed(exec, code, module.__dict__)
764-
if module.__dict__.get('__frozendict__', False):
765-
module.frozendict()
766764

767765
def load_module(self, fullname):
768766
"""This method is deprecated."""

Objects/moduleobject.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,26 +1267,9 @@ module_dir(PyObject *self, PyObject *args)
12671267
}
12681268

12691269

1270-
static PyObject *
1271-
module_frozendict(PyObject *self, PyObject *Py_UNUSED(args))
1272-
{
1273-
PyModuleObject *mod = _PyModule_CAST(self);
1274-
1275-
PyObject *frozendict;
1276-
frozendict = PyObject_CallOneArg((PyObject*)&PyFrozenDict_Type, mod->md_dict);
1277-
if (frozendict == NULL) {
1278-
return NULL;
1279-
}
1280-
1281-
Py_SETREF(mod->md_dict, frozendict);
1282-
1283-
Py_RETURN_NONE;
1284-
}
1285-
12861270
static PyMethodDef module_methods[] = {
12871271
{"__dir__", module_dir, METH_NOARGS,
12881272
PyDoc_STR("__dir__() -> list\nspecialized dir() implementation")},
1289-
{"frozendict", module_frozendict, METH_NOARGS, NULL},
12901273
{0}
12911274
};
12921275

0 commit comments

Comments
 (0)