Code

Opened 2 years ago

Closed 16 months ago

#18447 closed New feature (fixed)

LazyObject doesn't unwrap on dict access

Reported by: FunkyBob Owned by: zsiciarz
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 2 years ago.
18447_tests.patch (930 bytes) - added by d1ffuz0r 21 months ago.
test
lazy_with_tests.patch (1.6 KB) - added by d1ffuz0r 17 months ago.
joined in one

Download all attachments as: .zip

Change History (13)

Changed 2 years ago by FunkyBob

comment:1 Changed 2 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Makes sense to me, how about a test?

comment:2 Changed 2 years ago by anonymous

  • Needs documentation set
  • Needs tests set

comment:3 Changed 2 years ago by lukeplant

  • Needs documentation unset
  • Triage Stage changed from Unreviewed to Accepted

comment:4 Changed 22 months ago by d1ffuz0r

  • Cc d1fffuz0r@… added
  • Version changed from 1.4 to master

Added test for the patch in attachment

Last edited 21 months ago by d1ffuz0r (previous) (diff)

Changed 21 months ago by d1ffuz0r

test

comment:5 Changed 17 months 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 17 months ago by d1ffuz0r

joined in one

comment:6 Changed 17 months ago by d1ffuz0r

tested in Python 2.7, 3.3

comment:7 Changed 17 months ago by zsiciarz

  • Owner changed from nobody to zsiciarz
  • Status changed from new to assigned

comment:8 Changed 17 months ago by zsiciarz

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 16 months ago by aaugustin

  • Component changed from Uncategorized to Utilities

comment:10 Changed 16 months ago by Aymeric Augustin <aymeric.augustin@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 0efafa4c54ab8ad684df66c8e34928bb2ba88656:

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

Thanks Roman Gladkov and Zbigniew Siciarz.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.