summaryrefslogtreecommitdiff
path: root/requests/structures.py
Commit message (Collapse)AuthorAgeFilesLines
* revert changeKevin Burke2014-08-241-1/+1
|
* Add support for connect timeoutsKevin Burke2014-08-231-2/+2
| | | | | | | Modifies the timeout interface to also accept a tuple (connect, read) which would be used to set individual connect and read timeouts for Requests. Adds Advanced documentation explaining the interface and providing guidance for timeout values.
* remove unused IteratorProxyJosh Schneier2014-05-231-23/+0
|
* CaseInsensitiveDict now looks like a normal dictKenneth Reitz2014-05-121-4/+0
|
* Shorten str for case insensitive dictAvi Das2014-03-231-1/+1
|
* Fix parenthesis typoAvi Das2014-03-221-1/+1
|
* Add __str__ to case insensitive dict. Logging headers for debugging purposes ↵Avi Das2014-03-221-0/+3
| | | | is often necessary, and the currently logging the headers would be using __repr__ which would log the implementation detail of headers, caseinsensitivedict. Adding str lends a more printing and log friendly implementation for case insentitice dict
* Fix a few warnings flagged by PyDevDavid Pursehouse2013-07-221-1/+1
| | | | | | - Unused import of urlparse - Unnecessary definition of variable - Incorrect indentation
* Rewrite CaseInsensitiveDict to work correctly/sanelyColin Dunklau2013-04-301-26/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #649 and #1329 by making Session.headers a CaseInsensitiveDict, and fixing the implementation of CID. Credit for the brilliant idea to map `lowercased_key -> (cased_key, mapped_value)` goes to @gazpachoking, thanks a bunch. Changes from original implementation of CaseInsensitiveDict: 1. CID is rewritten as a subclass of `collections.MutableMapping`. 2. CID remembers the case of the last-set key, but `__setitem__` and `__delitem__` will handle keys without respect to case. 3. CID returns the key case as remembered for the `keys`, `items`, and `__iter__` methods. 4. Query operations (`__getitem__` and `__contains__`) are done in a case-insensitive manner: `cid['foo']` and `cid['FOO']` will return the same value. 5. The constructor as well as `update` and `__eq__` have undefined behavior when given multiple keys that have the same `lower()`. 6. The new method `lower_items` is like `iteritems`, but keys are all lowercased. 7. CID raises `KeyError` for `__getitem__` as normal dicts do. The old implementation returned 6. The `__repr__` now makes it obvious that it's not a normal dict. See PR #1333 for the discussions that lead up to this implementation
* it`s more pep8 nowoczkers2013-01-271-0/+2
|
* CHUNKED REQUESTS!Kenneth Reitz2013-01-101-0/+22
|
* Fixes #817.Ian Cordasco2012-09-021-0/+1
| | | | | Use dicts and lists where necessary but accept both dicts and lists of 2-tuples everywhere.
* no more multidictKenneth Reitz2012-08-211-358/+0
|
* MultiDictKenneth Reitz2012-08-211-0/+357
|
* Whitespace fixes following PEP8.Locker5372012-08-161-0/+1
|
* Expose case-insensitive key access when deleting a key from CaseInsensitiveDictMarcin Wielgoszewski2012-05-161-1/+1
|
* blahKenneth Reitz2012-01-231-2/+2
|
* test fixKenneth Reitz2011-11-121-0/+1
|
* Some Doc and doctoring fixes by the Speling Poleece.travis2011-10-191-1/+1
|
* supporting codes classKenneth Reitz2011-08-131-0/+18
|
* structures: CaseInsensitiveDict.__delitem__ missing "value" fixGulácsi Tamás2011-07-231-1/+1
|
* structures: little bit more general, lower-key-caching version of ↵Gulácsi Tamás2011-07-231-6/+25
| | | | CaseInsensitiveDict
* Subclass dict for CaseInsensitiveDict.James Rowe2011-05-271-40/+4
|
* Big API updateKenneth Reitz2011-05-161-1/+4
|
* pass things into the dictKenneth Reitz2011-05-141-2/+2
|
* Headers: Default to NoneKenneth Reitz2011-05-141-5/+2
|
* New CaseInsensitiveDictKenneth Reitz2011-05-141-332/+36
|
* preliminary multidictsKenneth Reitz2011-04-151-0/+360