File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 22Macro-driven metalanguage which compiles to Pyramid Scheme.
33"""
44
5- __version__ = "0.1.8 "
5+ __version__ = "0.1.9 "
66
77
88class PsllSyntaxError (SyntaxError ):
Original file line number Diff line number Diff line change 11import operator
2+ import sys
23from functools import lru_cache , reduce , singledispatch
34from typing import Union , overload
45
56from .ascii_trees import AbstractTree , Pyramid
67
8+ if sys .version_info >= (3 , 14 ):
9+ # Fix for lru_cache in Python 3.14+
10+ # See: https://github.com/python/cpython/issues/132064
11+ from functools import wraps
12+ from typing import Any , Callable , TypeVar
13+
14+ _old_lru_cache = lru_cache
15+
16+ _T = TypeVar ("_T" , bound = Callable )
17+
18+ def wrapped_lru_cache (* lar : Any , ** lkw : Any ) -> Callable [[_T ], _T ]:
19+ def decorator (func : _T ) -> _T :
20+ @wraps (func )
21+ def wrapper (* ar : Any , ** kw : Any ) -> Any :
22+ return _old_lru_cache (* lar , ** lkw )(func )(* ar , ** kw )
23+
24+ return wrapper # type: ignore
25+
26+ return decorator
27+
28+ lru_cache = wrapped_lru_cache # type: ignore
29+
30+
731# ===================================================================================
832#
933# ##### ## ## #### ## #####
Original file line number Diff line number Diff line change 22min_version = 4.0
33env_list =
44 ; py314t
5- ; py314 # FIXME: BROKEN!!
5+ py314
66 ; py313t
77 py313
88 py312
You can’t perform that action at this time.
0 commit comments