kennethreitz
6ec8a5e285
models and adapters
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-16 18:56:42 -04:00
kennethreitz
84c1eb2de2
working
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-16 18:11:21 -04:00
kennethreitz
b72081f3c0
working
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-16 09:58:09 -04:00
kennethreitz
e16fc666af
white / improvements
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-15 14:20:53 -04:00
kennethreitz
e8ccdd6343
same
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-15 11:15:22 -04:00
kennethreitz
aa7314e97a
python 3.6 syntax
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-15 11:07:09 -04:00
kennethreitz
0c722d9476
more __slots__
2018-03-15 11:04:25 -04:00
kennethreitz
5574076b05
__slots__
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-15 11:01:25 -04:00
kennethreitz
631076d600
__slots__
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-15 10:46:30 -04:00
kennethreitz
8a6bcfbe1a
validate
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-15 10:41:26 -04:00
kennethreitz
64d85b7ebf
use rfc8936
2018-03-15 10:39:26 -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
272ea7db4e
fix redirects
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-12 13:44:07 -04:00
kennethreitz
c7d0f3ef01
better mypy compliance
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-12 12:56:09 -04:00
kennethreitz
f531629a9b
remove python2–specific code
...
Signed-off-by: Kenneth Reitz <me@kennethreitz.org >
2018-03-12 11:58:21 -04:00
kennethreitz
6be73f90b1
/s/compat/basics
2018-03-12 11:53:12 -04:00
VasiliPupkin256
5d6eeb5a7f
Map urllib3 ReadTimeoutError to an appropriate ReadTimeout requests exception, issue #2392
2018-01-13 03:28:02 +03:00
Nate Prewitt
37f1d23c39
Merge remote-tracking branch 'upstream/master' into proposed/3.0.0
2017-10-15 13:59:50 -07:00
Mark Szymanski
e2f5a135c3
remove legacy super() call
2017-07-26 19:21:45 -05:00
Hugo Osvaldo Barrera
9766870807
Use comprehensions whenever possible
2017-07-14 11:42:32 -03:00
Ed Morley
4847f5b8cd
Allow Requests.Response to be used as a context manager
...
This saves having to wrap the call to requests with
`contextlib.closing()`, allowing it to be used directly in a
`with` statement, like so:
```
with requests.get('http://httpbin.org/get ', stream=True) as r:
# Do things with the response here.
```
Fixes #4136 .
2017-06-06 23:30:47 +01:00
Cory Benfield
548823be83
Clean up invalid indentation from merge
2017-05-31 10:41:47 +01:00
Cory Benfield
a6f7f5dc62
Clean up flake8 errors from merge
2017-05-31 10:39:27 +01:00
Cory Benfield
c3f4a028bf
Merge branch 'master' into proposed/3.0.0
2017-05-31 10:29:19 +01:00
kennethreitz
33619268f9
cleanup models.py
2017-05-29 23:00:09 -04:00
kennethreitz
7f14db17c8
new requests namespace
2017-05-29 12:11:43 -04:00
kennethreitz
6d3d5e59c9
fix models.py
2017-05-26 22:55:55 -04:00
kennethreitz
6c41633cfd
fix models.py
2017-05-26 22:50:13 -04:00
kennethreitz
c3367d1854
remove Request.send(session)
2017-05-26 21:28:52 -04:00
kennethreitz
dfd667df96
who wrote this shit
2017-05-26 21:17:13 -04:00
kennethreitz
ce64cce14e
API improvements
2017-05-26 21:07:37 -04:00
Nate Prewitt
a889b62c50
Merge branch 'master' into proposed/3.0.0
2017-05-21 16:25:55 -07:00
Hong Jen-Yee (PCMan)
458df8f4f4
Fix the additional newline generated by iter_lines() caused by a '\r\n' pair being separated in two different chunks.
2017-04-26 23:02:57 +08:00
Chris Gavin
19ba9f1097
Remove some unused imports.
2017-04-25 22:10:01 +01:00
Ruben Dura Tari
ead8fba84b
Fixes DeprecationWarnings in Python 3.6 due to invalid escape sequences. Fixes #3954
2017-04-05 15:51:58 +01:00
Vincent Barbaresi
d491e9f9b2
use [-1] instead of endswith() to work with bytes or string
...
Also add a parametrize on decode_unicode for iter_lines() test
to check with bytestrings and str content
2017-03-15 22:29:18 +01:00
Vincent Barbaresi
052595ffbf
add explanatory comment about skipping null chunks in iter_lines
2017-03-15 12:16:32 +01:00
Vincent Barbaresi
cc2ac23c0d
remove useless brackets in iter_lines boolean condition
2017-03-15 01:37:55 +01:00
Alex Chan
9881be25f3
Review markups for @Lukasa
2017-03-14 16:57:52 +01:00
Ian Epperson
9174925916
Fix bug when delimiter is split between responses
2017-03-14 16:57:52 +01:00
Nate Prewitt
5a65a0dab1
use InvalidHeader instead of ConflictingHeaderError
2017-03-01 07:32:14 -07:00
Nate Prewitt
a52fe6586c
consolidate super_len code and cleanup docstrings
2017-02-28 14:51:08 -07:00
Casey Davidson
f239fe754d
Change UnreachableCodeError to InvalidBodyError.
2017-02-28 14:49:52 -07:00
Casey Davidson
1003fdf0f2
Small fixes based on feedback in pull request.
2017-02-28 14:49:31 -07:00
Casey Davidson
033dfc165d
Raise an error if body is not null, has not length and is not streamable.
2017-02-28 14:49:20 -07:00
Casey Davidson
bfb202527d
Alternate fix for 3066 to refactor prepare_body to always call prepare_content_length.
...
This allows for the 'Content-Length' header to only be set in prepare_content_length.
2017-02-28 14:49:01 -07:00
Ian Cordasco
8e049bd9eb
Update docstrings for Response.__{bool,nonzero}__
...
Like the docstring added to Response.ok these were misleading and
vaguely incorrect. Better to be explicit than implicit.
2017-02-16 07:21:15 -06:00
Ian Cordasco
7a281e74ec
Correct docstring for Response.ok
2017-02-16 07:15:37 -06:00
Mislav Cimperšak
3664682539
added docstring for response.ok property
2017-02-16 10:06:28 +01:00