From a61a948b6293ed46972909652909e2540242f197 Mon Sep 17 00:00:00 2001 From: "Peter St. John" Date: Fri, 3 Jan 2025 10:14:43 -0700 Subject: [PATCH 1/5] Add typing-extensions as a dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 608e751..1e15158 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "zipp >= 3.1.0; python_version < '3.10'", + "zipp >= 3.1.0; typing-extensions >= 3.10; python_version < '3.10'", ] dynamic = ["version"] From 883380a5fcc482b67014b90b9aa7250d868c795a Mon Sep 17 00:00:00 2001 From: "Peter St. John" Date: Fri, 3 Jan 2025 11:45:51 -0700 Subject: [PATCH 2/5] Update pyproject.toml --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1e15158..25487d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,8 @@ classifiers = [ ] requires-python = ">=3.9" dependencies = [ - "zipp >= 3.1.0; typing-extensions >= 3.10; python_version < '3.10'", + "zipp >= 3.1.0; python_version < '3.10'", + "typing-extensions >= 3.10", ] dynamic = ["version"] From 6c1bc3cdb8f8a7d29252becc201508712040facc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jan 2025 13:45:20 -0500 Subject: [PATCH 3/5] Rely on Literal from stdlib. --- importlib_resources/abc.py | 3 +-- pyproject.toml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/importlib_resources/abc.py b/importlib_resources/abc.py index befe799..883d332 100644 --- a/importlib_resources/abc.py +++ b/importlib_resources/abc.py @@ -8,6 +8,7 @@ Iterable, Iterator, NoReturn, + Literal, Optional, Protocol, Text, @@ -17,8 +18,6 @@ runtime_checkable, ) -from typing_extensions import Literal - StrPath = Union[str, os.PathLike[str]] __all__ = ["ResourceReader", "Traversable", "TraversableResources"] diff --git a/pyproject.toml b/pyproject.toml index 25487d5..608e751 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,6 @@ classifiers = [ requires-python = ">=3.9" dependencies = [ "zipp >= 3.1.0; python_version < '3.10'", - "typing-extensions >= 3.10", ] dynamic = ["version"] From 6569354ad2cf38b202fdeaf11b49e639b1a00fbc Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jan 2025 13:46:39 -0500 Subject: [PATCH 4/5] Add news fragment. --- newsfragments/323.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/323.bugfix.rst diff --git a/newsfragments/323.bugfix.rst b/newsfragments/323.bugfix.rst new file mode 100644 index 0000000..964c119 --- /dev/null +++ b/newsfragments/323.bugfix.rst @@ -0,0 +1 @@ +Replaced reference to typing_extensions with stdlib Literal. From 7d3b2bfa1d8c53ecb64246ba16d8c632f8fcb6bf Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 3 Jan 2025 13:48:58 -0500 Subject: [PATCH 5/5] Finalize --- NEWS.rst | 9 +++++++++ newsfragments/323.bugfix.rst | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) delete mode 100644 newsfragments/323.bugfix.rst diff --git a/NEWS.rst b/NEWS.rst index 48899f0..a7c95e8 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -1,3 +1,12 @@ +v6.5.2 +====== + +Bugfixes +-------- + +- Replaced reference to typing_extensions with stdlib Literal. (#323) + + v6.5.1 ====== diff --git a/newsfragments/323.bugfix.rst b/newsfragments/323.bugfix.rst deleted file mode 100644 index 964c119..0000000 --- a/newsfragments/323.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Replaced reference to typing_extensions with stdlib Literal.