From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 8 Mar 2025 16:27:34 +0000 (+0200) Subject: [3.12] gh-113238: add Anchor to importlib.resources (GH-113801) (#130499) X-Git-Tag: v3.12.10~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d128edb0eca01e42219f0e216afce992917c29d3;p=thirdparty%2FPython%2Fcpython.git [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> --- 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)