Commit Graph

4440 Commits

Author SHA1 Message Date
Harrison Jackson 5a3aeedd18 Remove duplicate import warnings 2016-07-14 09:47:27 -06:00
Cory Benfield 6e54fd607f Merge pull request #3401 from Zeusw/patch-1
in python3.x not have StringIO
2016-07-14 08:57:49 +01:00
Zeusw cf938420f8 in python3.x not have StringIO
I think, should such an amendment.
2016-07-14 10:40:32 +08:00
Cory Benfield 425962cb13 Merge pull request #3390 from nateprewitt/3386_header_value_type
Defining header value type requirements and tests
2016-07-07 17:20:03 +01:00
Ian Cordasco 5d9b9ffab4 Merge pull request #3388 from nateprewitt/header_doc_update
updating documentation to reflect decision of #3386
2016-07-07 09:56:08 -05:00
Nate Prewitt 1cb3b797fe updating documentation to reflect decision of #3386 2016-07-07 07:44:20 -06:00
Nate Prewitt be31a90906 Defining header value type requirements and tests 2016-07-05 17:32:05 -06:00
Andrii Kostenko 7700ecae14 Support responses like HTTP/1.1 404 Unicode chars (#3385) 2016-07-05 09:01:19 -05:00
Nate Prewitt 71050e9ab9 adding in slice_length fix and test for chunk_size=None (#3370) 2016-07-02 15:56:20 -05:00
Cory Benfield bd9e8f2271 Merge pull request #3366 from nateprewitt/2947-no-returns-in-header
check for headers containing return characters
2016-07-02 20:32:17 +01:00
Nate Prewitt 2669ab797c check and test for headers containing return characters or leading whitespace 2016-07-02 13:10:47 -06:00
Cory Benfield ebadf81723 Merge pull request #3382 from nateprewitt/iter_content_docstring
updating iter_content docstring to match functionality
2016-07-02 19:10:20 +01:00
Nate Prewitt 0c08ca7154 updating docstring to match functionality 2016-07-02 08:43:23 -06:00
Joy Zheng 0bcf634135 Allow None value for chunk_size again (#3368) 2016-06-30 19:11:01 -05: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
Cory Benfield 36453b95b1 Merge pull request #3365 from nateprewitt/3364_chunking_is_int
added in type check for chunk_size
2016-06-28 08:33:29 +01:00
Nate Prewitt cf3c99890d added in type check for chunk_size 2016-06-27 19:58:15 -06:00
Cory Benfield 1f681d8843 Merge pull request #3358 from petedmarsh/master
Update list of supported Python versions in todo.rst
2016-06-21 19:53:19 +01:00
Peter Marsh 8484144c67 Update list of supported Python versions in todo.rst 2016-06-21 19:50:11 +01:00
kennethreitz 771ecd7efd Merge pull request #3236 from eriol/xfail-test
Use xfail marker for a test expected to fail without Internet connection
2016-06-20 22:17:23 -04:00
John Vandenberg 400d27f982 Test security warnings (#3289)
Verify that the expected warnings are emitted
with SubjectAltNameWarning emitted on all environments
due to the https server provided by httpbin_secure.
2016-06-17 08:00:05 -05:00
kennethreitz e12ee9407c Merge pull request #3297 from davidfischer/http-error-specifics
Note how HTTPErrors are raised
2016-06-08 23:57:44 -07:00
kennethreitz 6c9a0eff04 compensate for lack of taste 2016-06-09 00:38:53 -04:00
kennethreitz 7d0a94d8c6 Merge pull request #3298 from davidfischer/appengine-notes
Update a note on AppEngine
2016-06-08 19:49:06 -07:00
David Fischer 6f5b6bd4c4 Update a note on AppEngine 2016-06-08 19:31:32 -07:00
David Fischer 277d4a41ad Note how HTTPErrors are raised 2016-06-08 18:19:10 -07:00
Cory Benfield 7a404cf4ec Document header ordering. (#3295) 2016-06-08 11:44:33 -05:00
kennethreitz 8813787a12 wildly inaccurate button results in deletion
(not the button's fault!)
2016-06-04 22:08:47 -04:00
Cory Benfield bca205e9bf Merge pull request #3251 from sigmavirus24/bug/3250
Update documentation of Session.max_redirects
2016-06-01 11:08:39 -07:00
Ian Cordasco de4c75bbad Update documentation of Session.max_redirects
Fixes #3250
2016-06-01 11:00:42 -05:00
Daniele Tricoli 5e86103387 Use xfail marker for a test expected to fail without Internet connection
This is only a minor improvement on the great work of
https://github.com/kennethreitz/requests/pull/2859 that permits to run
tests on hosts without Internet connection.
2016-05-29 20:47:41 +02:00
Seppo Yli-Olli 9e9d2c6521 Make BaseAdapter describe the mandatory adapter interface (#3216)
* BaseAdapter definition of send is missing mandatory params

* Copy over relevant parts of the interface documentation

* Indentation fix

* Change base class documentation for close
2016-05-24 13:23:16 -05:00
Cory Benfield 49b69c4751 Merge pull request #3178 from haikuginger/master
Encoding JSON requests to bytes for urllib3 to handle
2016-05-22 17:02:09 +01:00
Brett Higgins b6d6894f53 Allow graceful interruption of testserver.Server
So that failing tests don't cause the server thread to hang
indefinitely, waiting for connections that will never come.

Rationale for suppressing error/traceback from interrupted
_accept_connection in testserver.Server:
https://gist.github.com/brettdh/b6e741227b2297f19d2118077f14dfa5

* Move server socket close to just before join

This way it handles the no-connections, no-exceptions case
as well as the exception case. If the server thread doesn't
exit by itself within 5 seconds of the context manager exit,
the accept will be interrupted.

* Address feedback

- pytest.raises rather than except:pass
- Move socket create/bind back to run()
- Timeout on accepting connections
2016-05-17 10:45:12 -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
Brett Higgins 35744c3e5d Use iter instead of noop list comprehension 2016-05-16 21:53:20 -04:00
Ian Cordasco 12e3631827 Merge pull request #3195 from kumarvaradarajulu/no_proxy_fix
Fix to check for Plain ip notations in no_proxy settings if not CIDR
2016-05-16 07:47:33 -05:00
Kumar Varadarajulu b94decc47c Combined tests to one tests for should_bypass_proxies method 2016-05-16 10:49:37 +00:00
Kumar Varadarajulu f59a95713e Added tests for should_bypass_proxies function 2016-05-16 10:40:22 +00: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
Ian Cordasco 4865f0f9bf Merge pull request #3188 from Lukasa/fixup-indentation
Replace tab with appropriate spaces.
2016-05-12 08:11:19 -05:00
Cory Benfield 0838685dab Replace tab with appropriate spaces. 2016-05-12 10:57:52 +01:00
Brett Higgins 1121f8b915 Support ALL_PROXY environment variable
Closes #3183.
2016-05-11 10:37:53 -04:00
Cory Benfield 87704105af Merge pull request #3179 from messense/messense-patch-1
Fix TypeError when get json-encoded content of a response
2016-05-06 13:59:01 +01:00
messense cb4c2c0b65 Fix TypeError when get json-encoded content of a response
``self.content`` could be ``None``, so ``len(self.content)`` may raise ``TypeError: object of type 'NoneType' has no len()``
2016-05-06 09:53:14 +08:00
Ian Cordasco 3669b4216a Merge pull request #3173 from Lukasa/socks-proxy-docs
Add section on SOCKS proxies.
2016-05-05 12:18:27 -05:00
Jesse Shapiro 04bb965c87 Fixing test; it was accomplishing the right thing, but doing it in the wrong way. 2016-05-05 12:23:59 -04:00
Jesse Shapiro 52c0daff5f Cleaning up comment on JSON encoding to be more strictly relevant. 2016-05-05 12:12:49 -04:00
Jesse Shapiro 9ff2e43cd6 Removing charset from JSON content type; tightening requirements on .encode() 2016-05-05 06:27:12 -04:00