Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion psll/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Macro-driven metalanguage which compiles to Pyramid Scheme.
"""

__version__ = "0.1.8"
__version__ = "0.1.9"


class PsllSyntaxError(SyntaxError):
Expand Down
24 changes: 24 additions & 0 deletions psll/build.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
import operator
import sys
from functools import lru_cache, reduce, singledispatch
from typing import Union, overload

from .ascii_trees import AbstractTree, Pyramid

if sys.version_info >= (3, 14):
# Fix for lru_cache in Python 3.14+
# See: https://github.com/python/cpython/issues/132064
from functools import wraps
from typing import Any, Callable, TypeVar

_old_lru_cache = lru_cache

_T = TypeVar("_T", bound=Callable)

def wrapped_lru_cache(*lar: Any, **lkw: Any) -> Callable[[_T], _T]:
def decorator(func: _T) -> _T:
@wraps(func)
def wrapper(*ar: Any, **kw: Any) -> Any:
return _old_lru_cache(*lar, **lkw)(func)(*ar, **kw)

return wrapper # type: ignore

return decorator

lru_cache = wrapped_lru_cache # type: ignore


# ===================================================================================
#
# ##### ## ## #### ## #####
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
min_version = 4.0
env_list =
; py314t
; py314 # FIXME: BROKEN!!
py314
; py313t
py313
py312
Expand Down