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 c927fd9

Browse filesBrowse files
[3.13] gh-128816: Fix warnings in test_doctest (GH-128817) (GH-128870)
* 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 714b851 commit c927fd9
Copy full SHA for c927fd9

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
@@ -2872,7 +2872,7 @@ def test_testfile(): r"""
28722872
>>> _colorize.COLORIZE = save_colorize
28732873
"""
28742874

2875-
class TestImporter(importlib.abc.MetaPathFinder, importlib.abc.ResourceLoader):
2875+
class TestImporter(importlib.abc.MetaPathFinder):
28762876

28772877
def find_spec(self, fullname, path, target=None):
28782878
return importlib.util.spec_from_file_location(fullname, path, loader=self)
@@ -2881,6 +2881,12 @@ def get_data(self, path):
28812881
with open(path, mode='rb') as f:
28822882
return f.read()
28832883

2884+
def exec_module(self, module):
2885+
raise ImportError
2886+
2887+
def create_module(self, spec):
2888+
return None
2889+
28842890
class TestHook:
28852891

28862892
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.