mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.11] GH-102700: allow built-in modules to be submodules (GH-103162) (GH-103322)
GH-102700: allow built-in modules to be submodules (GH-103162)
(cherry picked from commit 5d08c3ff7d)
Co-authored-by: Brett Cannon <brett@python.org>
This commit is contained in:
parent
58e330ac9c
commit
123680f9aa
3 changed files with 1 additions and 19 deletions
|
|
@ -747,8 +747,6 @@ def module_repr(module):
|
|||
|
||||
@classmethod
|
||||
def find_spec(cls, fullname, path=None, target=None):
|
||||
if path is not None:
|
||||
return None
|
||||
if _imp.is_builtin(fullname):
|
||||
return spec_from_loader(fullname, cls, origin=cls._ORIGIN)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue