From 8608d384c84ece28a10831d1f5144544c8c5f692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 18 Jul 2024 21:07:53 +0200 Subject: [PATCH] Add Python version specifiers to [core] dependencies Add Python version specifiers to importlib_metadata, importlib_resources and tomli dependencies, to require them only on Python versions on which they are actually used. --- newsfragments/4492.misc.rst | 1 + pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 newsfragments/4492.misc.rst diff --git a/newsfragments/4492.misc.rst b/newsfragments/4492.misc.rst new file mode 100644 index 0000000000..9da07e43f9 --- /dev/null +++ b/newsfragments/4492.misc.rst @@ -0,0 +1 @@ +Now backports in ``core`` dependencies are installed only on Python versions requiring them. diff --git a/pyproject.toml b/pyproject.toml index bcd2416334..61a9f9462a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -107,9 +107,9 @@ core = [ "ordered-set>=3.1.1", "more_itertools>=8.8", "jaraco.text>=3.7", - "importlib_resources>=5.10.2", - "importlib_metadata>=6", - "tomli>=2.0.1", + "importlib_resources>=5.10.2; python_version < '3.9'", + "importlib_metadata>=6; python_version < '3.10'", + "tomli>=2.0.1; python_version < '3.11'", "wheel>=0.43.0", # pkg_resources