From f7c068c4d5e66dbf227bb2dac4f6c563d05500fb Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 6 Oct 2024 12:50:55 -0500 Subject: [PATCH] fix helper with python3.8 --- src/propcache/_helpers_c.pyx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/propcache/_helpers_c.pyx b/src/propcache/_helpers_c.pyx index 5369e12..3999a67 100644 --- a/src/propcache/_helpers_c.pyx +++ b/src/propcache/_helpers_c.pyx @@ -1,5 +1,13 @@ # cython: language_level=3 -from types import GenericAlias +import sys +import types + +if sys.version_info >= (3, 9): + GenericAlias = types.GenericAlias +else: + + def GenericAlias(cls): + return cls cdef _sentinel = object()