Skip to content

Commit

Permalink
Merge branch 'main' into use-importlib-resources-for-doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Jan 15, 2025
2 parents 1cb9321 + 40a4d88 commit dca3a82
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Lib/asyncio/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Future:
# that it is not compatible by setting this to None.
# - It is set by __iter__() below so that Task.__step() can tell
# the difference between
# `await Future()` or`yield from Future()` (correct) vs.
# `await Future()` or `yield from Future()` (correct) vs.
# `yield Future()` (incorrect).
_asyncio_future_blocking = False

Expand Down
8 changes: 7 additions & 1 deletion Lib/test/test_doctest/test_doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2860,7 +2860,7 @@ def test_testfile(): r"""
>>> _colorize.COLORIZE = save_colorize
"""

class TestImporter(importlib.abc.MetaPathFinder, importlib.abc.ResourceLoader):
class TestImporter(importlib.abc.MetaPathFinder):

def find_spec(self, fullname, path, target=None):
return importlib.util.spec_from_file_location(fullname, path, loader=self)
Expand All @@ -2869,6 +2869,12 @@ def get_data(self, path):
with open(path, mode='rb') as f:
return f.read()

def exec_module(self, module):
raise ImportError

def create_module(self, spec):
return None

class TestHook:

def __init__(self, pathdir):
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.10.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ result from ``entry_points()`` as deprecated.

..
.. gh: 47383
.. gh-issue: 47383
.. date: 2021-04-08-19-32-26
.. nonce: YI1hdL
.. section: Library
Expand Down
4 changes: 2 additions & 2 deletions Misc/NEWS.d/3.11.0b1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ planned). Patch by Alex Waygood.

..
.. gh: 78157
.. gh-issue: 78157
.. date: 2022-05-05-20-40-45
.. nonce: IA_9na
.. section: Library
Expand Down Expand Up @@ -1289,7 +1289,7 @@ Deprecate the chunk module.

..
.. gh: 91498
.. gh-issue: 91498
.. date: 2022-04-10-08-39-44
.. nonce: 8oII92
.. section: Library
Expand Down

0 comments on commit dca3a82

Please sign in to comment.