[Django] #30127: Deprecate cached_property's name argument

10 views
Skip to first unread message

Django

unread,
Jan 23, 2019, 7:43:37 PM1/23/19
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
------------------------------------------------+------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Utilities | Version: 2.1
Severity: Normal | Keywords: 4.0
Triage Stage: Someday/Maybe | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/30127>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 9, 2019, 3:50:07 AM11/9/19
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: 2.1
Severity: Normal | Resolution:

Keywords: 4.0 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Thomas Grainger):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:1>

Django

unread,
Jan 1, 2021, 5:07:40 AM1/1/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: David
Type: | Smith
Cleanup/optimization | Status: assigned
Component: Utilities | Version: 2.1
Severity: Normal | Resolution:

Keywords: 4.0 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by David Smith):

* owner: nobody => David Smith
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:2>

Django

unread,
Oct 9, 2021, 4:43:00 AM10/9/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: 2.1
Severity: Normal | Resolution:

Keywords: 4.0 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0

-------------------------------------+-------------------------------------
Changes (by David Smith):

* owner: David Smith => (none)
* status: assigned => new
* easy: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:3>

Django

unread,
Dec 14, 2021, 9:38:44 AM12/14/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Utilities | Version: 2.1
Severity: Normal | Resolution:

Keywords: 4.0 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Marcelo Galigniana):

* owner: (none) => Marcelo Galigniana


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:4>

Django

unread,
Dec 14, 2021, 10:24:32 AM12/14/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: 4.0 | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* version: 2.1 => dev
* stage: Someday/Maybe => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:5>

Django

unread,
Dec 14, 2021, 12:02:25 PM12/14/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: 4.0 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Marcelo Galigniana):

[https://github.com/django/django/pull/15199 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:6>

Django

unread,
Dec 14, 2021, 12:03:19 PM12/14/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: 4.0 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Marcelo Galigniana):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:7>

Django

unread,
Dec 14, 2021, 1:47:33 PM12/14/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: 4.0 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


Comment:

You need to [https://docs.djangoproject.com/en/dev/internals/contributing
/writing-code/submitting-patches/#deprecating-a-feature deprecate it]
(`RemovedInDjango50Warning`) rather than simply remove it.

--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:8>

Django

unread,
Dec 14, 2021, 11:23:19 PM12/14/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: 4.0 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Marcelo Galigniana):

* needs_better_patch: 1 => 0


Comment:

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 [comment:8 Tim Graham]:


> You need to
[https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/submitting-patches/#deprecating-a-feature deprecate it]
(`RemovedInDjango50Warning`) rather than simply remove it.

--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:9>

Django

unread,
Dec 16, 2021, 7:24:33 AM12/16/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: assigned
Component: Utilities | Version: dev
Severity: Normal | Resolution:
Keywords: 4.0 | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:10>

Django

unread,
Dec 16, 2021, 2:10:10 PM12/16/21
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: closed
Component: Utilities | Version: dev
Severity: Normal | Resolution: fixed

Keywords: 4.0 | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"068b2c072b0d28cbd5ea63811779629cdaad8638" 068b2c07]:
{{{
#!CommitTicketReference repository=""
revision="068b2c072b0d28cbd5ea63811779629cdaad8638"
Fixed #30127 -- Deprecated name argument of cached_property().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:11>

Django

unread,
Jan 17, 2023, 5:49:43 AM1/17/23
to django-...@googlegroups.com
#30127: Deprecate cached_property's name argument
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Marcelo
Type: | Galigniana
Cleanup/optimization | Status: closed
Component: Utilities | Version: dev
Severity: Normal | Resolution: fixed
Keywords: 4.0 | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"5c10041f4636c3dfe637924ab24da85dd657d790" 5c10041]:
{{{
#!CommitTicketReference repository=""
revision="5c10041f4636c3dfe637924ab24da85dd657d790"
Refs #30127 -- Removed name argument for
django.utils.functional.cached_property().

Per deprecation timeline.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30127#comment:12>

Reply all
Reply to author
Forward
0 new messages