Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c4b4c5

Browse files
[issue19152] Revert 832579dbafd6.
1 parent 48b42ec commit 5c4b4c5

5 files changed

Lines changed: 193 additions & 224 deletions

File tree

Doc/library/importlib.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ find and load modules.
800800

801801
.. class:: ExtensionFileLoader(fullname, path)
802802

803-
A concrete implementation of :class:`importlib.abc.ExecutionLoader` for
803+
A concrete implementation of :class:`importlib.abc.InspectLoader` for
804804
extension modules.
805805

806806
The *fullname* argument specifies the name of the module the loader is to
@@ -834,10 +834,6 @@ find and load modules.
834834

835835
Returns ``None`` as extension modules do not have source code.
836836

837-
.. method:: get_filename(fullname)
838-
839-
Returns :attr:`path`.
840-
841837

842838
:mod:`importlib.util` -- Utility code for importers
843839
---------------------------------------------------

Lib/importlib/_bootstrap.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,11 +1153,6 @@ def get_source(self, fullname):
11531153
"""Return None as extension modules have no source code."""
11541154
return None
11551155

1156-
@_check_name
1157-
def get_filename(self, fullname):
1158-
"""Return the path to the source file as found by the finder."""
1159-
return self.path
1160-
11611156

11621157
class _NamespacePath:
11631158
"""Represents a namespace package's path. It uses the module name

Lib/importlib/abc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ def get_filename(self, fullname):
168168
set to."""
169169
raise NotImplementedError
170170

171-
_register(machinery.ExtensionFileLoader)
172-
173171

174172
class FileLoader(_bootstrap.FileLoader, ResourceLoader, ExecutionLoader):
175173

Misc/NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,6 @@ Library
206206
- Issue #19151: Fix docstring and use of _get_supported_file_loaders() to
207207
reflect 2-tuples.
208208

209-
- Issue #19152: Add ExtensionFileLoader.get_filename().
210-
211209
- Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
212210
docstrings and ValueError messages. Patch by Zhongyue Luo
213211

0 commit comments

Comments
 (0)