kennethreitz
631076d600
__slots__
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-15 10:46:30 -04:00
kennethreitz
6a27949e5f
rfc3986
2018-03-15 09:20:32 -04:00
kennethreitz
b2e99359fc
merge
2018-03-15 08:59:47 -04:00
kennethreitz
8a1baaf47b
white
2018-03-15 06:56:20 -04:00
kennethreitz
9cea8ce09d
black
...
https://github.com/ambv/black
2018-03-14 17:28:51 -04:00
kennethreitz
530db6c4b9
mypy improvements
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-12 12:59:59 -04:00
hugovk
006aa3de4f
Drop Python 2.6: OrderedDict is in collections from 2.7
2017-10-17 16:56:56 +03:00
Allan Crooks
a36247e148
Rename HTTPHeaderDict methods to getlist and setlist to be more consistent with other similar implementations.
2017-09-12 23:14:00 +01:00
Allan Crooks
95b127714b
Add HTTPHeaderDict data structure and tests.
2017-09-12 22:16:48 +01:00
kennethreitz
fb01456061
Merge pull request #3429 from nateprewitt/docstring_cleanup
...
Docstring cleanup
2016-07-20 18:38:38 -04:00
Nate Prewitt
b7809acb47
making class and function docstrings consistent
2016-07-20 11:43:47 -06:00
Nate Prewitt
2d4a89f5dc
adding in pep8 fixes
2016-07-20 10:30:08 -06:00
Nate Prewitt
15a3869006
making module docstrings and coding comments consistent
2016-07-19 14:51:14 -06:00
Piotr Jurkiewicz
c8a0fc6aa2
Use OrderedDict from .compat module
2016-04-15 04:43:53 +02:00
Piotr Jurkiewicz
4c04469cfb
Change _store of CaseInsensitiveDict to OrderedDict
2016-04-14 18:10:50 +02:00
Kevin Burke
f0b9b60f62
revert change
2014-08-24 19:46:46 -07:00
Kevin Burke
c2aeaa3959
Add support for connect timeouts
...
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.
2014-08-23 15:12:29 -07:00
Josh Schneier
7815953cb4
remove unused IteratorProxy
2014-05-23 11:52:17 -04:00
Kenneth Reitz
c15a8f8a3d
CaseInsensitiveDict now looks like a normal dict
2014-05-12 15:10:15 -04:00
Avi Das
c2e6fe4d5d
Shorten str for case insensitive dict
2014-03-23 11:38:37 -05:00
Avi Das
a3fb689942
Fix parenthesis typo
2014-03-22 16:30:22 -05:00
Avi Das
98ac3df713
Add __str__ to case insensitive dict. Logging headers for debugging purposes 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
2014-03-22 15:42:23 -05:00
David Pursehouse
4f64938ff0
Fix a few warnings flagged by PyDev
...
- Unused import of urlparse
- Unnecessary definition of variable
- Incorrect indentation
2013-07-22 17:14:45 +09:00
Colin Dunklau
f7596c75dc
Rewrite CaseInsensitiveDict to work correctly/sanely
...
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
2013-04-30 14:52:27 -05:00
oczkers
40a060cf57
it`s more pep8 now
2013-01-27 02:04:12 +01:00
Kenneth Reitz
ef8563ab36
CHUNKED REQUESTS!
2013-01-10 01:58:29 -05:00
Ian Cordasco
8081d7b15c
Fixes #817 .
...
Use dicts and lists where necessary but accept both dicts and lists of
2-tuples everywhere.
2012-09-02 23:10:28 -04:00
Kenneth Reitz
c323047dbe
no more multidict
2012-08-21 01:10:55 +10:00
Kenneth Reitz
e5fc88ad37
MultiDict
2012-08-21 00:43:16 +10:00
Locker537
42d0a2169e
Whitespace fixes following PEP8.
2012-08-16 17:38:35 -04:00
Marcin Wielgoszewski
4b7c5dab0e
Expose case-insensitive key access when deleting a key from CaseInsensitiveDict
2012-05-16 13:58:51 -04:00
Kenneth Reitz
b0e2e4f284
blah
2012-01-23 00:15:25 -05:00
Kenneth Reitz
ec926a4958
test fix
2011-11-12 16:46:53 -05:00
travis
055f7c1eb6
Some Doc and doctoring fixes by the Speling Poleece.
2011-10-19 10:00:13 -05:00
Kenneth Reitz
6cead64345
supporting codes class
2011-08-13 14:50:48 -04:00
Gulácsi Tamás
747f882b0e
structures: CaseInsensitiveDict.__delitem__ missing "value" fix
2011-07-23 22:25:07 +02:00
Gulácsi Tamás
04c456b877
structures: little bit more general, lower-key-caching version of CaseInsensitiveDict
2011-07-23 22:16:12 +02:00
James Rowe
5962c0ea86
Subclass dict for CaseInsensitiveDict.
2011-05-27 00:17:44 -07:00
Kenneth Reitz
6e13e7343d
Big API update
2011-05-16 01:13:05 -04:00
Kenneth Reitz
35beda21b8
pass things into the dict
2011-05-14 22:02:14 -04:00
Kenneth Reitz
29aa7736ca
Headers: Default to None
2011-05-14 21:52:33 -04:00
Kenneth Reitz
5172d24e66
New CaseInsensitiveDict
2011-05-14 21:50:25 -04:00
Kenneth Reitz
d3a46c822f
preliminary multidicts
2011-04-15 18:00:10 -04:00