Commit Graph

338 Commits

Author SHA1 Message Date
Cory Benfield c3f4a028bf Merge branch 'master' into proposed/3.0.0 2017-05-31 10:29:19 +01:00
Ryan Pineo 1278ecdf71 Fix requests.packages not having package attributes
Fixes #4104
2017-05-29 17:27:10 -04:00
kennethreitz 7f14db17c8 new requests namespace 2017-05-29 12:11:43 -04:00
kennethreitz 2ccecf6dbd skip for now 2017-05-28 13:05:09 -04:00
kennethreitz c3a00771e3 todo 2017-05-28 00:43:54 -04:00
kennethreitz 276024b170 fix tests 2017-05-27 19:33:40 -04:00
kennethreitz 4c155de9fd test entrypoints 2017-05-27 11:06:53 -04:00
kennethreitz af52bf795e remove bunk tests 2017-05-26 22:55:44 -04:00
kennethreitz 47f170bb35 fix __init__.py 2017-05-26 22:53:28 -04:00
kennethreitz 818daff12a more test removal of old imports 2017-05-26 22:48:58 -04:00
kennethreitz 0bb200515c remove test imports from packages 2017-05-26 22:48:01 -04:00
Nate Prewitt 009b80c95a persist session-level CookiePolicy 2017-05-22 09:51:40 -07:00
Nate Prewitt a889b62c50 Merge branch 'master' into proposed/3.0.0 2017-05-21 16:25:55 -07:00
Jonas Laursen af66521381 Fix #4025 2017-05-18 09:04:34 -07:00
Cory Benfield ddada2d750 We no longer downcase some hosts. 2017-05-09 10:08:06 +01:00
schlamar 1c38e1f5f6 proxy bypass on Windows without DNS lookups 2017-05-04 10:44:47 +02:00
schlamar 4f34446b36 test proxy bypass with config from registry 2017-05-04 07:46:59 +02:00
schlamar 724fd44b97 revert 8e6e47af and c121b98c 2017-05-04 07:46:59 +02: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
shmuelamar 722b1dae96 fix handle of non-ascii location on redirects 2017-04-18 00:08:59 +03:00
shmuelamar a3e597c171 fix unicode decode error on py2 when handling redirect without scheme 2017-04-14 16:20:27 +03:00
Alexander 'Leo' Bergolth 1be6a17edc oops! import Timeout as Urllib3Timeout 2017-04-03 16:49:46 +02:00
Alexander 'Leo' Bergolth 28768b945c use @pytest.mark.parametrize 2017-04-03 16:32:38 +02:00
Alexander 'Leo' Bergolth 93cb1ca763 add some tests for passing in Timeout objects 2017-04-02 15:20:29 +02:00
Bastien Gérard 4207867aaf PR review fixes:
- used httpbin_secure for tests
- updated docstring related to `verify` param"
- used TLS acronym instead of SSL
2017-03-22 21:28:38 +01:00
Bastien Gérard 7d8b87c37f #3926 raise IOError when providing an invalid path to a CA bundle or certificate files 2017-03-22 21:28:38 +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 5a8bc19384 add more tests for iter_lines()
check the case of an empty chunk somewhere in the stream
2017-03-15 01:37:55 +01:00
Vincent Barbaresi 0380ac5893 add some parametrized tests for iter_lines()
Write a list of different chunk splits and their expected results
to test against, using ianepperson's breakdown as specification:
https://github.com/kennethreitz/requests/pull/2431#issuecomment-72333964
2017-03-15 01:37:48 +01:00
Alex Chan 9881be25f3 Review markups for @Lukasa 2017-03-14 16:57:52 +01:00
Ian Epperson 02031e3e14 Test to show bug when delimiter is split between reads 2017-03-14 16:57:52 +01:00
Nate Prewitt 64b66b6409 test prepare_content_length sets expected headers 2017-03-02 05:27:22 -07: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 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
Victor Pfautz 2aaf6ac038 Fixed some typos (#3892)
* Fixed some typos
2017-02-27 16:25:10 +00:00
David Fontenot c121b98c4e wrapped proxy_bypass() with cache lookup
Used to alleviate long gethostbyaddr calls
Made new TimedCache and decorator to wrap
a function with a cache
* Entries looked up older than a minute (default amount)
are evicted.
* When full, evicts the oldest entry
2017-02-23 14:04:16 -08:00
Cory Benfield 56dd77fc52 Merge branch 'master' into proposed/3.0.0 2017-02-14 15:59:53 +00:00
Nate Prewitt f47aff68f1 properly handled failed seek 2017-02-14 07:45:41 -07:00
Rotem Yaari efcbe93075 Make Response.raise_for_status() return the response object if the response is successful
This allows for chaining method calls in cases where we want to raise for bad codes but use the response otherwise,
e.g. requests.get(URL).raise_for_status().json()['value']
2017-02-12 11:11:40 +02:00
Nate Prewitt 16bbc7478f revert removal of request param from resolve_redirects 2017-02-11 23:35:19 -07:00
kennethreitz 6bd6249051 Merge pull request #3865 from JohnVillalovos/master
Allow use of 'no_proxy' in the proxies argument
2017-02-10 15:50:10 -06:00
jonathan vanasco 70f31a3166 * initial attempt at get_redirect_target
* removing the `i` from the redirect detection while-loop
2017-02-10 13:53:23 -05:00
John L. Villalovos 85400d8d67 Allow use of 'no_proxy' in the proxies argument
Add the ability to add 'no_proxy' and a value to the 'proxies'
dictionary argument.

https://github.com/kennethreitz/requests/issues/2817

Closes gh-2817
2017-02-10 09:41:54 -08:00
Cory Benfield 241f2b2a6b Merge branch 'master' into proposed/3.0.0 2017-02-10 17:40:52 +00:00
Matthew Medal 8a58427d8a Only send HTTPDigestAuth on 4xx challenges
Resolves: #3772
2017-01-27 12:56:50 -08:00
kennethreitz 97b5bc21d1 fix broken tests 2017-01-21 21:41:16 -05:00
winterJ e8c0a99cb1 Remove unused module 2017-01-11 18:20:52 +09:00
Герасименко Евгений 0cb6ddaecf Fixed tests for python 2.x. 2016-12-29 10:30:56 +07:00
Герасименко Евгений 1c34ac3ae6 Fixed detection of utf-32-be by BOM. 2016-12-29 10:21:32 +07:00