Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/utils/datastructures.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25093 -- Added ↵darkryder2015-07-101-0/+3
| | | | utils.datastructures.OrderedSet.__len__()
* Removed django.utils.datastructures.SortedDict per ↵Tim Graham2015-01-171-125/+0
| | | | deprecation timeline.
* Removed django.utils.datastructures.MergeDict per ↵Tim Graham2015-01-171-115/+0
| | | | deprecation timeline; refs #18659.
* Fixed #23968 -- Replaced list comprehension with ↵Jon Dufresne2014-12-081-2/+2
| | | | generators and dict comprehension
* Fixed #23664 -- Provided a consistent definition for ↵Thomas Chaumeny2014-10-161-1/+4
| | | | | | OrderedSet.__bool__ 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.
* Revert "Fixed #23384 -- Allowed overriding part of a ↵Claude Paroz2014-09-051-20/+0
| | | | | | | | | dictionary-type setting" 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.
* Fixed #23384 -- Allowed overriding part of a ↵Claude Paroz2014-08-301-0/+20
| | | | | | | | dictionary-type setting This change is needed for upcoming changes where settings might be grouped in a parent dictionary. Thanks Tim Graham for the review.
* Fixed #21188 -- Introduced subclasses for ↵Claude Paroz2014-03-081-2/+4
| | | | | | | to-be-removed-in-django-XX warnings Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Correct flake8 E302 violationsRay Ashman Jr2013-11-031-0/+6
|
* Fixed E225 pep8 warnings.Tim Graham2013-10-231-1/+1
|
* Fixed E221 pep8 warnings.Tim Graham2013-10-221-11/+11
|
* Fixed #18659 -- Deprecated request.REQUEST and MergeDictBouke Haarsma2013-10-171-0/+2
| | | | Thanks Aymeric Augustin for the suggestion.
* Fixed #15625 -- Made message in MultiValueDictKeyError ↵Tim Graham2013-09-181-1/+1
| | | | | | less verbose. Thanks margieroginski for the suggestion.
* Fixed #20989 -- Removed useless explicit list ↵Simon Charette2013-08-301-1/+1
| | | | comprehensions.
* Fixed #20989 -- Removed explicit list comprehension ↵Tim Graham2013-08-291-1/+1
| | | | | | | inside dict() and tuple() Thanks jeroen.pulles at redslider.net for the suggestion and helper script.
* Docs tweaks (thanks timgraham)Andrew Godwin2013-08-101-1/+1
|
* Back SortedSet onto OrderedDict, rename it, and a few ↵Andrew Godwin2013-08-101-2/+3
| | | | typo fixes
* Merge remote-tracking branch 'core/master' into ↵Andrew Godwin2013-08-091-1/+5
|\ | | | | | | | | | | | | | | | | | | | | | | schema-alteration 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
| * Deprecated SortedDict (replaced with ↵Curtis Maloney2013-08-041-1/+5
| | | | | | | | | | | | collections.OrderedDict) Thanks Loic Bistuer for the review.
* | Merge branch 'master' into schema-alterationAndrew Godwin2013-07-021-26/+0
|\|
| * Removed insert(), value_for_insert() SortedDict methods ↵Ramiro Morales2013-06-291-26/+0
| | | | | | | | deprecated in Django 1.5.
* | Merge branch 'master' into schema-alterationAndrew Godwin2013-05-101-1/+7
|\|
| * Fixed #20321 -- Added missing key name in MergeDict ↵Claude Paroz2013-04-261-1/+1
| | | | | | | | | | | | KeyError message Thanks mark.harviston et gmail.com for the report.
| * Fixed #20276 -- Implemented __bool__ for MergeDictAnton Baklanov2013-04-191-0/+6
| | | | | | | | | | MergeDict evaluates now to False if all contained dicts are empty. Thanks til for the report and the initial patch.
* | Adding a dependency graph class and testsAndrew Godwin2013-05-101-0/+30
|/
* Advanced pending deprecation warnings.Aymeric Augustin2012-12-291-2/+2
| | | | Also added stacklevel argument, fixed #18127.
* Some changes to SortedDict to make it faster under py2Anssi Kääriäinen2012-11-131-19/+14
| | | | Refs #19276
* Allow reversed iteration over SortedDict.Mitar2012-10-151-0/+3
| | | Iterators cannot be reversed easily without this method.
* remove a bunch of unnescesarry iterkeys() callsAlex Gaynor2012-08-081-1/+1
|
* [py3] Updated dict-like data structures for Python 3.Aymeric Augustin2012-07-251-55/+80
| | | | | | 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.
* Fixed QueryDict.setlistdefault.Aymeric Augustin2012-07-251-2/+4
| | | | | | It was broken by a seemingly innocuous change in MultiValueDict. Document the pitfall for now. This is fragile and should be considered for refactoring.
* Rolled back a unnecessary change in 8f002867b2.Aymeric Augustin2012-07-251-0/+1
| | | | | | This keeps the implementation of setdefault and setlistdefault consistent. Also it's marginally faster than looking up the value again.
* Added tests for deprecation warnings and fixed the ↵Alex Gaynor2012-07-241-4/+8
| | | | argument order for the warnings.
* Remove DotExpandedDict, which was undocumented and unused.Alex Gaynor2012-07-151-32/+0
|
* Fix an incredibly emberassing typo.Alex Gaynor2012-07-151-3/+3
|
* Deprecate two methods (which I seriously doubt anyone ↵Alex Gaynor2012-07-151-0/+9
| | | | ever used, but they were documented so...) because they cannot be implemented efficiently on top of collections.SortedDict in Python 2.7 and up.
* Cleaned up the QueryDict implementation.Alex Gaynor2012-07-141-1/+0
| | | | | | - Use super(). - Don't poke at internals. - Don't override methods for no reason.
* Fixed SortedDict.__copy__()Anssi Kääriäinen2012-04-301-3/+7
| | | | | | | | 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.
* Fixed #17634 -- Optimized the performance of ↵Aymeric Augustin2012-02-091-9/+12
| | | | | | MultiValueDict by using append 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
* Fixed #12375 -- Added a dict() method to convert a ↵Jannis Leidel2011-06-161-0/+6
| | | | | | MultiValueDict (such as a 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
* Fixed #6580 -- Added `default` parameter to ↵Jannis Leidel2011-05-221-2/+8
| | | | | | `MultiValueDict.getlist` method (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
* Removed a bunch more Python 2.4 workarounds now that we ↵Adrian Holovaty2011-03-281-6/+3
| | | | | | don't support that 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
* Fixed MultiValueDict's copy implementation to be ↵Alex Gaynor2010-10-271-5/+7
| | | | | | consistant with all other copies. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12632 -- Improved performance of `SortedDict`. ↵Justin Bronn2010-09-111-1/+3
| | | | | | Thanks, Alex Gaynor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added more readable __str__ and __repr__ methods to ↵Malcolm Tredinnick2010-09-101-0/+21
| | | | | | | | MergeDict. Thanks, john@calixto.net. Fixed #3508. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12820. Implemented other dict methods for ↵Joseph Kocherhans2010-02-231-4/+26
| | | | | | MergeDict. Thanks, Gisle Aas. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed a whole bunch of places to raise exception ↵Adrian Holovaty2010-01-101-4/+4
| | | | | | instances instead of 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
* Fixed #12476 -- Forced the rollout of generators passed ↵Russell Keith-Magee2010-01-031-0/+7
| | | | | | to SortedDict so 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
* Fixed #11753 - Q objects with callables no longer ↵Jacob Kaplan-Moss2009-12-171-2/+2
| | | | | | explode on Python 2.4. Thanks, Jeremy Dunck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11874 -- Optimizations and cleanups for ↵Russell Keith-Magee2009-12-121-16/+17
| | | | | | SortedDict. Thanks to Alex 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