From 51675584d823aabbfe028669c16731d3285f8d60 Mon Sep 17 00:00:00 2001 From: lojack5 <1458329+lojack5@users.noreply.github.com> Date: Wed, 18 Oct 2023 14:25:09 -0600 Subject: [PATCH] Tentative: fix for ParamSpec on Python < 3.10 Alternate solution is to remove the callable typing on CallAfter and CallLater --- etgtools/pi_generator.py | 4 ++++ requirements/devel.txt | 1 + requirements/install.txt | 1 + 3 files changed, 6 insertions(+) diff --git a/etgtools/pi_generator.py b/etgtools/pi_generator.py index e1c140ca..85ca6929 100644 --- a/etgtools/pi_generator.py +++ b/etgtools/pi_generator.py @@ -84,6 +84,10 @@ from enum import IntEnum, IntFlag, auto from typing import (Any, overload, TypeAlias, TypeVar, ParamSpec, Generic, Union, Optional, List, Tuple, Callable ) +try: + from typing import ParamSpec +except ImportError: + from typing_extensions import ParamSpec """ diff --git a/requirements/devel.txt b/requirements/devel.txt index cda34ed5..21f5c1af 100644 --- a/requirements/devel.txt +++ b/requirements/devel.txt @@ -22,3 +22,4 @@ markupsafe==1.1.1 doc2dash==2.3.0 beautifulsoup4 attrdict3 ; sys_platform == 'win32' +typing-extensions; python_version < '3.10' diff --git a/requirements/install.txt b/requirements/install.txt index 2061eda2..797a7243 100644 --- a/requirements/install.txt +++ b/requirements/install.txt @@ -3,3 +3,4 @@ numpy < 1.17 ; python_version <= '2.7' numpy ; python_version >= '3.0' and python_version < '3.12' # pillow < 3.0 six +typing-extensions; python_version < '3.10' \ No newline at end of file