From d128edb0eca01e42219f0e216afce992917c29d3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 8 Mar 2025 18:27:34 +0200 Subject: [PATCH] [3.12] gh-113238: add Anchor to importlib.resources (GH-113801) (#130499) (cherry picked from commit c85c0026a64c2a902138feeb73a9c66af1af31e0) Co-authored-by: Mike Zimin <122507876+mikeziminio@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> --- Lib/importlib/resources/__init__.py | 2 ++ .../next/Library/2024-01-07-23-31-44.gh-issue-113238.wFWBfW.rst | 1 + 2 files changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2024-01-07-23-31-44.gh-issue-113238.wFWBfW.rst diff --git a/Lib/importlib/resources/__init__.py b/Lib/importlib/resources/__init__.py index 34e3a9950cc5..a7a9ccb368f4 100644 --- a/Lib/importlib/resources/__init__.py +++ b/Lib/importlib/resources/__init__.py @@ -4,6 +4,7 @@ from ._common import ( as_file, files, Package, + Anchor, ) from ._legacy import ( @@ -22,6 +23,7 @@ from .abc import ResourceReader __all__ = [ 'Package', + 'Anchor', 'Resource', 'ResourceReader', 'as_file', diff --git a/Misc/NEWS.d/next/Library/2024-01-07-23-31-44.gh-issue-113238.wFWBfW.rst b/Misc/NEWS.d/next/Library/2024-01-07-23-31-44.gh-issue-113238.wFWBfW.rst new file mode 100644 index 000000000000..51b4d144a94e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-01-07-23-31-44.gh-issue-113238.wFWBfW.rst @@ -0,0 +1 @@ +Add ``Anchor`` to ``importlib.resources`` (in order for the code to comply with the documentation) -- 2.47.3