Commit Graph

213 Commits

Author SHA1 Message Date
kennethreitz 14d6fa1472 __version__.py 2017-05-25 20:07:38 -04:00
kennethreitz 1001bc671a fix imports 2017-05-25 19:58:44 -04:00
schlamar 1c38e1f5f6 proxy bypass on Windows without DNS lookups 2017-05-04 10:44:47 +02:00
schlamar 724fd44b97 revert 8e6e47af and c121b98c 2017-05-04 07:46:59 +02:00
Chris Gavin 19ba9f1097 Remove some unused imports. 2017-04-25 22:10:01 +01:00
Thomas Grainger fcb272cc36 remove seemingly redundant pyflakes references 2017-04-20 13:23:56 +01:00
Xuanwo 1cd173a82c Fix a typo in utils
Signed-off-by: Xuanwo <xuanwo.cn@gmail.com>
2017-04-08 20:56:28 +08: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
Nate Prewitt f47aff68f1 properly handled failed seek 2017-02-14 07:45:41 -07: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
Герасименко Евгений 1c34ac3ae6 Fixed detection of utf-32-be by BOM. 2016-12-29 10:21:32 +07:00
Cory Benfield f72684e13c Merge pull request #3655 from nateprewitt/tzickel_post_redirect_w_streamable
Rewind readable body before POST redirect
2016-11-03 10:31:04 +00:00
Nate Prewitt 40402cd0dd adding rewind for re-POST bodies 2016-11-02 09:56:56 -06:00
Cory Benfield 595a409a18 Merge pull request #3627 from nateprewitt/remove_update_call
remove RequestsCookieJar specific update call
2016-10-27 20:53:18 +01:00
Nate Prewitt dfd85f2099 make add_dict_to_cookiejar cookielib.CookieJar compatible 2016-10-27 13:17:41 -06:00
Mohamed Elawadi f5b5c293b9 fix issue when the file-like object raises an IOError with tell 2016-10-18 11:09:25 +02:00
Brian Bamsch 3ac70defff Update Comments & Magic Strings 2016-09-27 20:41:17 -07:00
Brian Bamsch f002b73026 Move to_native_string to _internal_utils.py to avoid circular dependency 2016-09-26 21:41:01 -07:00
Cory Benfield 5524472cc7 Merge pull request #3535 from nateprewitt/3339_avoid_getvalues
avoid use of getvalues in super_len
2016-09-14 08:10:28 +01:00
Nate Prewitt 99364b6b0b removing use of seek to set total_length 2016-08-24 15:06:53 -06:00
Skipper Seabold 8873a09097 Fall back to streaming 2016-08-24 09:59:33 -06:00
Skipper Seabold d4965a4ec6 Python 2 compatibility 2016-08-24 09:59:33 -06:00
Skipper Seabold af7729f64a Use seek from end rather than getvalue 2016-08-24 09:59:28 -06:00
Michael Hunsinger 7c80222afa Fixed another scheme proxy over "all" priority 2016-08-22 21:01:13 -06:00
Michael Hunsinger 77b068bb9e Fixed bug to give scheme proxy priority over "all" 2016-08-21 10:59:33 -06:00
Nate Prewitt d7f56ba938 reverting 3362 2016-08-09 07:36:39 -06:00
Ville Skyttä 542fbbc67f Document bunch of return types 2016-08-09 13:32:56 +03: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
Nate Prewitt be31a90906 Defining header value type requirements and tests 2016-07-05 17:32:05 -06:00
Nate Prewitt 71050e9ab9 adding in slice_length fix and test for chunk_size=None (#3370) 2016-07-02 15:56:20 -05:00
Nate Prewitt 2669ab797c check and test for headers containing return characters or leading whitespace 2016-07-02 13:10:47 -06:00
Nate Prewitt 92fe51c0af adding asserted_encoding check on None type encoding to match text() behavior (#3362) 2016-06-28 14:22:00 -05:00
Ian Cordasco cd4e6b9aef Merge pull request #3185 from brettdh/3183-support-all-proxy-env-var
Support ALL_PROXY environment variable
2016-05-17 10:42:31 -05:00
Kumar Varadarajulu 17b6c5742c consider plain ip notation of an ip in no_proxy if not in cidr notation 2016-05-16 06:11:25 +00:00
Brett Higgins 4bf8866172 Add 'all' proxy selection to select_proxy
It seems it's necessary both in pulling all_proxy from the environment
(rebuild_proxies) and deciding which proxy to use (select_proxy).

Also added new functional test.
2016-05-13 15:30:38 -04:00
John R. Lenton 4e7beef860 utils: let select_proxy not raise an exception when url has no hostname 2016-04-26 11:22:44 +01:00
Dmitry Dygalo 1eb153529a Merge remote-tracking branch 'upstream/master' into utils-unit-tests
Conflicts:
	tests/test_utils.py
2016-03-13 10:24:47 +01:00
Cory Benfield 6cc0b56d51 Switch to treat files without tell() as zero-length 2016-03-07 09:05:43 +00:00
Cory Benfield e034dd1140 Allow for exceptions from tell() 2016-03-07 08:31:23 +00:00
Dmitry Dygalo f123f89d32 Added unit tests for utils module 2016-02-19 10:32:23 +01:00
Cory Benfield 6e0649d9f8 Push code review advice from @sigmavirus24 2015-12-19 08:44:21 +00:00
Cory Benfield 589f13ca9d Handle bytes and unicode URLs for netloc 2015-12-18 09:22:23 +00:00
Ian Cordasco 5397ef71b3 Fix super_len for partially read files
Closes #2872
2015-11-10 21:22:24 -06:00
Cory Benfield f1fd11e54f Emit warnings when using text mode files. 2015-10-24 09:29:23 +01:00
Ian Cordasco 96e9490100 Merge pull request #2803 from asieira/master
Update default user-agent (#2785)
2015-10-05 09:54:17 -05:00
Cory Benfield d996a95cf7 Merge pull request #2721 from Lukasa/no_proxy_fix
Ignore empty fields in no_proxy env var
2015-10-05 15:28:49 +01:00