Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Lib/importlib/_bootstrap.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -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:
Expand Down
17 changes: 0 additions & 17 deletions Lib/test/test_importlib/builtin/test_finder.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,13 +37,6 @@ def test_failure(self):
spec=self.machinery.BuiltinImporter.find_spec(name)
self.assertIsNone(spec)

deftest_ignore_path(self):
# The value for 'path' should always trigger a failed import.
withutil.uncache(util.BUILTINS.good_name):
spec=self.machinery.BuiltinImporter.find_spec(util.BUILTINS.good_name,
['pkg'])
self.assertIsNone(spec)


(Frozen_FindSpecTests,
Source_FindSpecTests
Expand DownExpand Up@@ -77,16 +70,6 @@ def test_failure(self):
loader=self.machinery.BuiltinImporter.find_module('importlib')
self.assertIsNone(loader)

deftest_ignore_path(self):
# The value for 'path' should always trigger a failed import.
withutil.uncache(util.BUILTINS.good_name):
withwarnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
loader=self.machinery.BuiltinImporter.find_module(
util.BUILTINS.good_name,
['pkg'])
self.assertIsNone(loader)


(Frozen_FinderTests,
Source_FinderTests
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
Allow built-in modules to be submodules. This allows submodules to be statically linked into a CPython binary.