#12476 closed (fixed)
dumpdata with no arguments no longer dumps for all apps
Reported by: | Gabriel Farrell | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
As of r11952, dumpdata no longer outputs data for all apps when called with no arguments. May the gods help me figure out what changed.
Attachments (2)
Change History (9)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
The issue is a list comprehension was replaced with a generator expression, and for some godforesaken reason SortedDict can't be instantiated with a genexpr:
>>> SortedDict((i, None) for i in xrange(2)) [2] {} >>> SortedDict([(i, None) for i in xrange(2)]) [3] {0: None, 1: None}
IMO we should fix the root issue, although replacing the genexpr with a list comp is obviously the quick fix.
by , 15 years ago
Initial patch (solves the issue). I'm not completely happy with it.
comment:3 by , 15 years ago
Component: | Serialization → Core framework |
---|---|
Has patch: | set |
milestone: | → 1.2 |
Triage Stage: | Unreviewed → Accepted |
I'm changing the component since that's the real issue.
comment:4 by , 15 years ago
That patch makes sense. Heaven knows a way to set up the SortedDict without reading the data twice.
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [12064]) Fixed #12476 -- Forced the rollout of generators passed to SortedDict so that the data source can be read twice. Thanks to gsf for the report, and Alex for the patch.
comment:6 by , 15 years ago
(In [12065]) [1.1.X] Fixed #12476 -- Forced the rollout of generators passed to SortedDict so that the data source can be read twice. Thanks to gsf for the report, and Alex for the patch.
Backport of r12064 from trunk.
The output, for reference, is an empty list.