summaryrefslogtreecommitdiff
path: root/django/utils/datastructures.py
AgeCommit message (Collapse)Author
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
2008-06-26Fixed #7109 -- Quote certain values before passing them for substitution inMalcolm Tredinnick
Field.db_type(). This fixes a problem with using reserved words for field names in Oracle. Only affects Oracle at the moment, but the same changes could easily be used by other backends if they are required (requires changing creation.py, only). This commit also reverts [7501] so that if the fix doesn't work, it will show up in the tests (and if it does work, the tests will prevent us from breaking it again). git-svn-id: http://code.djangoproject.com/svn/django/trunk@7743 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-21Fixed #6627 -- Made dict.clear() work for SortedDicts.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-18Fixed #6611 -- When copying a SortedDict, make a new copy of the keys list.Malcolm Tredinnick
Thanks, Jeremy Dunck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-16Made a bunch of small doc rewordings from changes over the past couple of weeksAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7122 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-03Fixed #6465 -- Tweaked MergeDict.getlist() to work with Django's ↵Malcolm Tredinnick
MultiValueDict class. Thanks, Matt McClanahan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7062 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-01Edited docstring changes from [6714]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6800 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29Fixed #6050 -- Handled edge-case of duplicate keys being passed whenMalcolm Tredinnick
initialising SortedDict. Patch from Collin Grady and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6751 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25Made `MultiValueDict`'s `get` and `getlist` method docstrings more descriptive.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6714 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25Minor styling fix in `DotExpandedDict.__init__`.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25Changed several hardcoding of `dict` method calls in ↵Gary Wilson Jr
`django.utils.datastructures.py` to use `super` instead. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-25In `MergeDict` class, changed variable names to not clash with `dict` builtin.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-12Simplified `SortedDict.__deepcopy__` now that the its constructor can take a ↵Gary Wilson Jr
sequence of tuples. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6669 bcc190cf-cafb-0310-a4f2-bffc1f526a37