#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 , 3 years ago
| Has patch: | unset |
|---|---|
| Resolution: | → duplicate |
| Status: | new → closed |
comment:2 by , 3 years ago
| Has patch: | set |
|---|
PR https://github.com/django/django/pull/16482 is a duplicate of https://github.com/django/django/pull/16480, so closing this ticket as a duplicate of https://code.djangoproject.com/ticket/34233.
Duplicate of #34233. A separate ticket is not necessary.