Opened 10 years ago
Closed 10 years ago
#11693 closed defect (fixed)
Methods decorated with lazy do not look like data descriptors
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.2 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: |
Modified |
||
Internal Changes: |
Description
The lazy
class doesn't implement the __set__
method, so it doesn't look like a data descriptor. This was discussed in #11684.
In implementing the __set__
method, we need to decide whether methods decorated with lazy
should behave like read-only properties
. Another approach would be to add a lazyproperty
class for lazily-evaluated attributes that should be readonly.
Attachments (0)
Change History (3)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Proposed changes in log:rjollos.git:t11693.
comment:3 by , 10 years ago
API Changes: | modified (diff) |
---|---|
Milestone: | 1.0.3 → 1.0.2 |
Resolution: | → fixed |
Status: | assigned → closed |
There is at least one assignment to an attribute decorated with
lazy
: trunk/trac/web/main.py@12922:536#L531. That would suggest that we shouldn't change the behaviour (at least on 1.0-stable).