mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-07 13:54:45 +03:00
Use lru_cache for Python 3.8 compatibilty
This commit is contained in:
parent
96eb24b768
commit
9f75bbaf90
|
@ -17,7 +17,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import builtins
|
import builtins
|
||||||
from functools import cache
|
from functools import lru_cache
|
||||||
from types import CodeType
|
from types import CodeType
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ def imagemath_convert(self: _Operand, mode: str) -> _Operand:
|
||||||
return _Operand(self.im.convert(mode))
|
return _Operand(self.im.convert(mode))
|
||||||
|
|
||||||
|
|
||||||
@cache
|
@lru_cache
|
||||||
def _get_ops() -> dict[str, Any]:
|
def _get_ops() -> dict[str, Any]:
|
||||||
return {k[10:]: v for k, v in globals().items() if k[:10] == "imagemath_"}
|
return {k[10:]: v for k, v in globals().items() if k[:10] == "imagemath_"}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user