Opened 22 months ago

Closed 22 months ago

Last modified 22 months 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, 22 months ago

Has patch: unset
Resolution: duplicate
Status: newclosed

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

Last edited 22 months ago by Mariusz Felisiak (previous) (diff)

comment:2 by Hugo van Kemenade, 22 months ago

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