[Django] #18717: Setting attributes on deferred objects should trigger field's descriptor's __set__()

18 views
Skip to first unread message

Django

unread,
Aug 4, 2012, 7:34:30 PM8/4/12
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------+--------------------
Reporter: Kronuz | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
Setting attributes on deferred objects (DeferredAttribute) should trigger
original field's descriptor's __set__() (if any).
Currently, specially for custom fields set up as descriptors defining
__set__(), the original field's __set__ is never called when setting
object attributes on deferred fields.

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

Django

unread,
Oct 24, 2012, 5:01:54 PM10/24/12
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------+------------------------------------

Reporter: Kronuz | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.4
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by lrekucki):

* needs_docs: => 0
* needs_better_patch: => 1
* needs_tests: => 1
* stage: Unreviewed => Accepted


Comment:

The patch failes as {{{DeferredAttribute}}} no longer has {{{model_ref}}}.
On a side note, {{{_meta.get_field_by_name}} can be used instead of
iterating.

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

Django

unread,
Mar 15, 2013, 4:01:46 AM3/15/13
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------------+-------------------------------------
Reporter: Kronuz | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.4
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 1
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* type: Uncategorized => Bug
* component: Uncategorized => Database layer (models, ORM)


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

Django

unread,
May 19, 2013, 11:12:44 AM5/19/13
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------------+-------------------------------------
Reporter: Kronuz | Owner: shaz
Type: Bug | Status: assigned

Component: Database layer | Version: 1.4
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 1
Needs tests: 1 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by shaz):

* owner: nobody => shaz
* status: new => assigned


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

Django

unread,
Oct 7, 2015, 2:20:19 PM10/7/15
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------------+-------------------------------------
Reporter: Kronuz | Owner: shaz
Type: Bug | Status: assigned
Component: Database layer | Version: 1.4
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by timgraham:

Old description:

> Setting attributes on deferred objects (DeferredAttribute) should trigger
> original field's descriptor's __set__() (if any).
> Currently, specially for custom fields set up as descriptors defining
> __set__(), the original field's __set__ is never called when setting
> object attributes on deferred fields.

New description:

Setting attributes on deferred objects (`DeferredAttribute`) should


trigger original field's descriptor's `__set__()` (if any).
Currently, specially for custom fields set up as descriptors defining

`__set__()`, the original field's `__set__` is never called when setting


object attributes on deferred fields.

--

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

Django

unread,
May 30, 2016, 9:10:16 AM5/30/16
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------------+-------------------------------------
Reporter: Kronuz | Owner:
Type: Bug | Status: new

Component: Database layer | Version: 1.4
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* owner: shaz =>
* status: assigned => new


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

Django

unread,
Sep 20, 2016, 10:18:52 AM9/20/16
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------------+-------------------------------------
Reporter: Kronuz | Owner: nobody

Type: Bug | Status: new
Component: Database layer | Version: 1.4
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

@Kronuz, is the issue still relevant (I was thinking
7f51876f99851fdc3fef63aecdfbcffa199c26b9 might have helped)? If so, can
you update the patch and add a test? Or at least add some more concrete
steps to reproduce to help someone else contribute to the issue?

Django

unread,
Nov 26, 2016, 9:51:19 AM11/26/16
to django-...@googlegroups.com
#18717: Setting attributes on deferred objects should trigger field's descriptor's
__set__()
-------------------------------------+-------------------------------------
Reporter: German M. Bravo | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.4
(models, ORM) |
Severity: Normal | Resolution: needsinfo

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* status: new => closed
* resolution: => needsinfo


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

Reply all
Reply to author
Forward
0 new messages