summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
AgeCommit message (Collapse)Author
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2013-11-02Correct flake8 E302 violationsRay Ashman Jr
2013-10-23Fixed E225 pep8 warnings.Tim Graham
2013-10-22Fixed E221 pep8 warnings.Tim Graham
2013-10-17Fixed #18659 -- Deprecated request.REQUEST and MergeDictBouke Haarsma
Thanks Aymeric Augustin for the suggestion.
2013-09-18Fixed #15625 -- Made message in MultiValueDictKeyError less verbose.Tim Graham
Thanks margieroginski for the suggestion.
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
2013-08-29Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()Tim Graham
Thanks jeroen.pulles at redslider.net for the suggestion and helper script.
2013-08-10Docs tweaks (thanks timgraham)Andrew Godwin
2013-08-10Back SortedSet onto OrderedDict, rename it, and a few typo fixesAndrew Godwin
2013-08-09Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/core/management/commands/flush.py django/core/management/commands/syncdb.py django/db/models/loading.py docs/internals/deprecation.txt docs/ref/django-admin.txt docs/releases/1.7.txt
2013-08-04Deprecated SortedDict (replaced with collections.OrderedDict)Curtis Maloney
Thanks Loic Bistuer for the review.
2013-07-02Merge branch 'master' into schema-alterationAndrew Godwin
2013-06-28Removed insert(), value_for_insert() SortedDict methods deprecated in Django ↵Ramiro Morales
1.5.
2013-05-10Merge branch 'master' into schema-alterationAndrew Godwin
2013-05-10Adding a dependency graph class and testsAndrew Godwin
2013-04-26Fixed #20321 -- Added missing key name in MergeDict KeyError messageClaude Paroz
Thanks mark.harviston et gmail.com for the report.
2013-04-19Fixed #20276 -- Implemented __bool__ for MergeDictAnton Baklanov
MergeDict evaluates now to False if all contained dicts are empty. Thanks til for the report and the initial patch.
2012-12-29Advanced pending deprecation warnings.Aymeric Augustin
Also added stacklevel argument, fixed #18127.
2012-11-13Some changes to SortedDict to make it faster under py2Anssi Kääriäinen
Refs #19276
2012-10-15Allow reversed iteration over SortedDict.Mitar
Iterators cannot be reversed easily without this method.
2012-08-08remove a bunch of unnescesarry iterkeys() callsAlex Gaynor
2012-07-25[py3] Updated dict-like data structures for Python 3.Aymeric Augustin
The keys/items/values methods return iterators in Python 3, and the iterkeys/items/values methods don't exist in Python 3. The behavior under Python 2 is unchanged.
2012-07-25Fixed QueryDict.setlistdefault.Aymeric Augustin
It was broken by a seemingly innocuous change in MultiValueDict. Document the pitfall for now. This is fragile and should be considered for refactoring.
2012-07-25Rolled back a unnecessary change in 8f002867b2.Aymeric Augustin
This keeps the implementation of setdefault and setlistdefault consistent. Also it's marginally faster than looking up the value again.
2012-07-24Added tests for deprecation warnings and fixed the argument order for the ↵Alex Gaynor
warnings.
2012-07-14Remove DotExpandedDict, which was undocumented and unused.Alex Gaynor
2012-07-14Fix an incredibly emberassing typo.Alex Gaynor
2012-07-14Deprecate two methods (which I seriously doubt anyone ever used, but they ↵Alex Gaynor
were documented so...) because they cannot be implemented efficiently on top of collections.SortedDict in Python 2.7 and up.
2012-07-14Cleaned up the QueryDict implementation.Alex Gaynor
- Use super(). - Don't poke at internals. - Don't override methods for no reason.
2012-04-30Fixed SortedDict.__copy__()Anssi Kääriäinen
Fixed #18175 -- Calling SortedDict.__copy__() resulted in changes to the original dictionary. The reason was likely related to subclassing dict. Thanks to linovia for report and patch.
2012-02-09Fixed #17634 -- Optimized the performance of MultiValueDict by using append ↵Aymeric Augustin
instead of copy and by minimizing the number of dict lookups. Refs #736. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-16Fixed #12375 -- Added a dict() method to convert a MultiValueDict (such as a ↵Jannis Leidel
QueryDict) to a dictionary of key-value pairs. Thanks, oinopion and hvdklauw. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-22Fixed #6580 -- Added `default` parameter to `MultiValueDict.getlist` method ↵Jannis Leidel
(the base class for `QueryDict`). Many thanks to mk and andrewebdev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Removed a bunch more Python 2.4 workarounds now that we don't support that ↵Adrian Holovaty
version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-27Fixed MultiValueDict's copy implementation to be consistant with all other ↵Alex Gaynor
copies. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11Fixed #12632 -- Improved performance of `SortedDict`. Thanks, Alex Gaynor.Justin Bronn
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10Added more readable __str__ and __repr__ methods to MergeDict.Malcolm Tredinnick
Thanks, john@calixto.net. Fixed #3508. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22Fixed #12820. Implemented other dict methods for MergeDict. Thanks, Gisle Aas.Joseph Kocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Changed a whole bunch of places to raise exception instances instead of ↵Adrian Holovaty
old-style raising exception classes plus a comma. Good for the future Python 3 conversion git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-03Fixed #12476 -- Forced the rollout of generators passed to SortedDict so ↵Russell Keith-Magee
that the data source can be read twice. Thanks to gsf for the report, and Alex for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-17Fixed #11753 - Q objects with callables no longer explode on Python 2.4. ↵Jacob Kaplan-Moss
Thanks, Jeremy Dunck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-12Fixed #11874 -- Optimizations and cleanups for SortedDict. Thanks to Alex ↵Russell Keith-Magee
Gaynor and Armin Ronacher for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10As long as we're micro-optomizing, do it right -- using map() shaves another ↵Jacob Kaplan-Moss
dozen or so seconds off the test suite run time. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-10Micro-optomization to SortedDict.values(). Yes, it looks silly, but it ↵Jacob Kaplan-Moss
shaves 30 seconds (5%) off the run time of the test suite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31Fixed #8847, #10370: added some missing methods to MultiValueDict after ↵Jacob Kaplan-Moss
[8399]. Thanks, James Turk and rfk. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-31Fixed #10184: QueryDicts with multiple values can now be safely pickled. ↵Jacob Kaplan-Moss
Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Fixed #7496 -- It's now possible to pickle SortedDicts with pickle protocol 2Malcolm Tredinnick
(used in caching). Thanks, John Huddleston. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16Fixed #7331 -- Made `QueryDict.iteritems` behave like `QueryDict.items`, ↵Gary Wilson Jr
thanks jurev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01Fixed #2070: refactored Django's file upload capabilities.Jacob Kaplan-Moss
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues. This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37