Opened 4 years ago

Closed 4 years ago

#18447 closed New feature (fixed)

LazyObject doesn't unwrap on dict access

Reported by: FunkyBob Owned by: Zbigniew Siciarz
Component: Utilities Version: master
Severity: Normal Keywords:
Cc: d1fffuz0r@…, flo@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description


Attachments (3)

lazy.patch (666 bytes) - added by FunkyBob 4 years ago.
18447_tests.patch (930 bytes) - added by Roman Gladkov 4 years ago.
test
lazy_with_tests.patch (1.6 KB) - added by Roman Gladkov 4 years ago.
joined in one

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by FunkyBob

Attachment: lazy.patch added

comment:1 Changed 4 years ago by anonymous

Makes sense to me, how about a test?

comment:2 Changed 4 years ago by anonymous

Needs documentation: set
Needs tests: set

comment:3 Changed 4 years ago by Luke Plant

Needs documentation: unset
Triage Stage: UnreviewedAccepted

comment:4 Changed 4 years ago by Roman Gladkov

Cc: d1fffuz0r@… added
Version: 1.4master
Version 0, edited 4 years ago by Roman Gladkov (next)

Changed 4 years ago by Roman Gladkov

Attachment: 18447_tests.patch added

test

comment:5 Changed 4 years ago by fhahn

Cc: flo@… added
Needs tests: unset

I think putting the test and the patch into one file would make applying the patch a tiny bit easier.

Changed 4 years ago by Roman Gladkov

Attachment: lazy_with_tests.patch added

joined in one

comment:6 Changed 4 years ago by Roman Gladkov

tested in Python 2.7, 3.3

comment:7 Changed 4 years ago by Zbigniew Siciarz

Owner: changed from nobody to Zbigniew Siciarz
Status: newassigned

comment:8 Changed 4 years ago by Zbigniew Siciarz

I added more meaningful assertions and renamed the test case to be more consistent with others. Pull request here: https://github.com/django/django/pull/829

comment:9 Changed 4 years ago by Aymeric Augustin

Component: UncategorizedUtilities

comment:10 Changed 4 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: assignedclosed

In 0efafa4c54ab8ad684df66c8e34928bb2ba88656:

Fixed #18447 -- Made LazyObject unwrap on dict access.

Thanks Roman Gladkov and Zbigniew Siciarz.

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