Opened 6 years ago

Closed 3 years ago

Last modified 2 years ago

#30127 closed Cleanup/optimization (fixed)

Deprecate cached_property's name argument

Reported by: Tim Graham Owned by: Marcelo Galigniana
Component: Utilities Version: dev
Severity: Normal Keywords: 4.0
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Django 2.2 is the last version to support Python 3.5 where cached_property's name argument is required. Following the release of Django 4.0, most apps will drop support for Django 2.2 (and hence Python 3.5), so Django 4.0 can deprecate the name argument without giving warnings that aren't actionable as long as apps want to keep support for Python 3.5.

Change History (12)

comment:1 by Thomas Grainger, 5 years ago

it may be worth deprecating it entirely for a py3 backport https://code.djangoproject.com/ticket/30949#ticket

comment:2 by David Smith, 4 years ago

Owner: changed from nobody to David Smith
Status: newassigned

comment:3 by David Smith, 3 years ago

Easy pickings: set
Owner: David Smith removed
Status: assignednew

comment:4 by Marcelo Galigniana, 3 years ago

Owner: set to Marcelo Galigniana
Status: newassigned

comment:5 by Tim Graham, 3 years ago

Triage Stage: Someday/MaybeAccepted
Version: 2.1dev

comment:6 by Marcelo Galigniana, 3 years ago

comment:7 by Marcelo Galigniana, 3 years ago

Has patch: set

comment:8 by Tim Graham, 3 years ago

Patch needs improvement: set

You need to deprecate it (RemovedInDjango50Warning) rather than simply remove it.

in reply to:  8 comment:9 by Marcelo Galigniana, 3 years ago

Patch needs improvement: unset

Sorry Tim! I hadn't read how to deprecate a feature.

I updated the PR. Let me know any necessary change!

Thank you for the answer and explanation.

Replying to Tim Graham:

You need to deprecate it (RemovedInDjango50Warning) rather than simply remove it.

comment:10 by Mariusz Felisiak, 3 years ago

Triage Stage: AcceptedReady for checkin

comment:11 by Mariusz Felisiak <felisiak.mariusz@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In 068b2c07:

Fixed #30127 -- Deprecated name argument of cached_property().

comment:12 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

In 5c10041:

Refs #30127 -- Removed name argument for django.utils.functional.cached_property().

Per deprecation timeline.

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