Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#34270 closed Cleanup/optimization (duplicate)

Use @functools.cache instead of @functools.lru_cache(maxsize=None)

Reported by: Hugo van Kemenade Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

functools.cache was added in Python 3.9 and returns the same as functools.lru_cache(maxsize=None)

https://docs.python.org/3/library/functools.html#functools.cache

Now Python 3.10 is the lowest supported version for Django 5.0, let's use the shorter one.

https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django

Change History (2)

comment:1 by Mariusz Felisiak, 2 years ago

Has patch: unset
Resolution: duplicate
Status: newclosed

Duplicate of #34233. A separate ticket is not necessary.

Last edited 2 years ago by Mariusz Felisiak (previous) (diff)

comment:2 by Hugo van Kemenade, 2 years ago

Has patch: set
Note: See TracTickets for help on using tickets.
Back to Top