Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 45b89bf

Browse filesBrowse files
[3.12] gh-128816: Fix warnings in test_doctest (GH-128817) (GH-128871)
* Fix a deprecation warning for using importlib.resources.abc.ResourceReader. * Fix an import warning when importing readline (if it has not yet been imported). (cherry picked from commit 599be68) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
1 parent 0308bcf commit 45b89bf
Copy full SHA for 45b89bf

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎Lib/test/test_doctest/test_doctest.py

Copy file name to clipboardExpand all lines: Lib/test/test_doctest/test_doctest.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,7 @@ def test_testfile(): r"""
27802780
>>> sys.argv = save_argv
27812781
"""
27822782

2783-
class TestImporter(importlib.abc.MetaPathFinder, importlib.abc.ResourceLoader):
2783+
class TestImporter(importlib.abc.MetaPathFinder):
27842784

27852785
def find_spec(self, fullname, path, target=None):
27862786
return importlib.util.spec_from_file_location(fullname, path, loader=self)
@@ -2789,6 +2789,12 @@ def get_data(self, path):
27892789
with open(path, mode='rb') as f:
27902790
return f.read()
27912791

2792+
def exec_module(self, module):
2793+
raise ImportError
2794+
2795+
def create_module(self, spec):
2796+
return None
2797+
27922798
class TestHook:
27932799

27942800
def __init__(self, pathdir):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.