Opened 20 months ago

Closed 20 months ago

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

Has patch: unset
Resolution: duplicate
Status: newclosed

Duplicate of #34233.

Version 0, edited 20 months ago by Mariusz Felisiak (next)

comment:2 by Hugo van Kemenade, 20 months ago

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