mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[2.2.x] Removed django.utils.lru_cache usage.
Backport of 0367bc6d04ca6d1a4a21a69a839f6d404508f8df from master.
This commit is contained in:
parent
0838cc0139
commit
5911d25916
@ -1,6 +1,5 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
from functools import lru_cache
|
||||||
from django.utils import lru_cache
|
|
||||||
|
|
||||||
|
|
||||||
class IntConverter:
|
class IntConverter:
|
||||||
@ -58,7 +57,7 @@ def register_converter(converter, type_name):
|
|||||||
get_converters.cache_clear()
|
get_converters.cache_clear()
|
||||||
|
|
||||||
|
|
||||||
@lru_cache.lru_cache(maxsize=None)
|
@lru_cache(maxsize=None)
|
||||||
def get_converters():
|
def get_converters():
|
||||||
return {**DEFAULT_CONVERTERS, **REGISTERED_CONVERTERS}
|
return {**DEFAULT_CONVERTERS, **REGISTERED_CONVERTERS}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user