summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
AgeCommit message (Collapse)Author
2015-07-09Fixed #25093 -- Added utils.datastructures.OrderedSet.__len__()darkryder
2015-01-17Removed django.utils.datastructures.SortedDict per deprecation timeline.Tim Graham
2015-01-17Removed django.utils.datastructures.MergeDict per deprecation timeline; refs ↵Tim Graham
#18659.
2014-12-08Fixed #23968 -- Replaced list comprehension with generators and dict ↵Jon Dufresne
comprehension
2014-10-16Fixed #23664 -- Provided a consistent definition for OrderedSet.__bool__Thomas Chaumeny
This also defines QuerySet.__bool__ for consistency though this should not have any consequence as bool(qs) used to fallback on QuerySet.__len__ in Py3.
2014-09-05Revert "Fixed #23384 -- Allowed overriding part of a dictionary-type setting"Claude Paroz
This reverts commit 66757fee7e921ad4c35e0b3f80c25e026100b31c. Discussions have led to think that this functionality does not bring significant benefits to justify the added complexity. Read also discussions on ticket #22734.
2014-08-30Fixed #23384 -- Allowed overriding part of a dictionary-type settingClaude Paroz
This change is needed for upcoming changes where settings might be grouped in a parent dictionary. Thanks Tim Graham for the review.
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