Commit Graph

5890 Commits

Author SHA1 Message Date
kennethreitz 2824867412 v2.9.2 2016-04-29 17:52:19 -04:00
kennethreitz f803dc6c99 updated authors 2016-04-29 17:52:11 -04:00
kennethreitz ce5e312593 Merge pull request #3096 from piotrjurkiewicz/master
Change _store of CaseInsensitiveDict to OrderedDict
2016-04-29 17:47:35 -04:00
Ian Cordasco ecebf337ed Merge pull request #3139 from markshannon/fix/3138
Initialize hash_utf8 to None, preventing NameError. Fixes #3138.
2016-04-29 11:05:19 -05:00
Mark Shannon abe02ed89f Initialize hash_utf8 to None, preventing NameError. Fixes #3138. 2016-04-29 16:49:24 +01:00
Cory Benfield 252bfa7885 Merge pull request #3136 from Natim/readthedocs.io
Update readthedocs links.
2016-04-28 11:43:14 +01:00
Rémy HUBSCHER 70a344d8eb Update readthedocs links. 2016-04-28 12:39:10 +02:00
Cory Benfield 343027893b Merge pull request #3132 from chipaca/no-hostname-no-cry
utils: let select_proxy not raise an exception when url has no hostname
2016-04-26 11:35:23 +01: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
Ian Cordasco bbeb0001cd Merge pull request #3108 from kevinburke/flip-conditional
Flip conditional in session.send()
2016-04-21 10:30:22 -05:00
Kevin Burke ae1ac2d4e0 Flip conditional in session.send()
Previously we checked that the `request` being sent was an instance of a
PreparedRequest. If a user somehow created a PreparedRequest using a different
Requests library instance, this check makes the request un-sendable.

(This happened recently - unbeknownst to me, my server was running an outdated
version of pip, vulnerable to this issue - pypa/pip#1489, which creates
multiple subdirectories (src/requests, src/requests/requests) when you rerun
pip install --target. So the PreparedRequest was being created in one version
of the library and compared against the other version of the library, and
throwing this exception, even though they were both PreparedRequest instances!)

It would probably be preferable to check the object's behavior (instead of
its type), but a PreparedRequest has a lot of behavior, and it wouldn't be
really feasible or allow us to provide a helpful error message to check all
of it here. Instead flip the conditional to guard against the user sending an
unprepared Request, which should still give us most of the benefits of the
better error message.

Fixes #3102
2016-04-21 08:12:05 -07:00
kennethreitz aa1c3adf9a Merge pull request #3100 from hitstergtd/hitstergtd-docfixes-1
Remove stale sentence in philosophy.rst
2016-04-17 13:26:24 -04:00
Piotr Jurkiewicz b1a7dcd799 Fix test_headers_preserve_order 2016-04-16 22:21:10 +02:00
Hitster GTD d801d7797e Remove stale sentence in philosophy.rst
Sentence contained reference to version 1.0.0.
2016-04-16 10:57:24 +01:00
Ian Cordasco 9fc765638f Merge pull request #2754 from Lukasa/python3-redirect-3.0.0
Fix unicode redirects on Python 3.
2016-04-15 16:39:18 -05:00
Ian Cordasco 41fc9ebff7 Merge pull request #2839 from Lukasa/issue/2836
Make sure we build environment settings properly.
2016-04-15 16:38:50 -05:00
Ian Cordasco 60aee145b9 Merge pull request #3091 from bodgit/proxy
Clear any pooled proxy connections
2016-04-15 07:50:06 -05:00
Matt Dainty 2029a8a931 Clear any pooled proxy connections
As well as clearing any pooled direct connections, iterate over any
ProxyManager objects and clear any pooled proxy connections there as well.
2016-04-15 09:33:37 +01:00
Piotr Jurkiewicz c8a0fc6aa2 Use OrderedDict from .compat module 2016-04-15 04:43:53 +02:00
Piotr Jurkiewicz 4f5741e1ff Add test of headers order preservation 2016-04-15 00:35:57 +02:00
Piotr Jurkiewicz 4c04469cfb Change _store of CaseInsensitiveDict to OrderedDict 2016-04-14 18:10:50 +02:00
kennethreitz 4a716e0dfc Merge pull request #2897 from BraulioVM/dummy-server
Test socket server
2016-04-11 16:29:02 -04:00
Braulio Valdivielso Martínez 634b2beb39 Fixed indenting issues 2016-04-11 20:03:23 +02:00
Ian Cordasco e65d6fc637 Merge pull request #3082 from tzickel/master
Added a test to show a faulty behaviour when posting binary data for an object with no __iter__
2016-04-11 07:38:50 -05:00
Cory Benfield b5d375417f Merge pull request #3086 from sleshep/master
add rtype in session.request,help pycharm easy.
2016-04-11 08:14:39 +01:00
liuyang 2981366f56 add rtype in session.request 2016-04-11 14:33:23 +08:00
kennethreitz 2874fd18fe Merge pull request #3080 from Lukasa/rfc7838
Add 421 Misdirected Request.
2016-04-10 16:49:27 -04:00
tzickel 219490ea7f Make a dummy test 2016-04-08 23:17:37 +03:00
tzickel fb230709a8 Fix for the test ? 2016-04-08 22:23:35 +03:00
tzickel 2246a52a36 Added a test to show a faulty behaviour when posting binary data for an object
with no __iter__
2016-04-08 20:25:01 +03:00
Cory Benfield 831d8e0a1e Add 421 Misdirected Request. 2016-04-08 08:23:46 +01:00
Cory Benfield e988e22d0f Fix test failures. 2016-04-07 08:46:39 +01:00
Cory Benfield eab12fa029 Fixup Python 3 test failures. 2016-04-07 08:43:38 +01:00
Cory Benfield 8f33e56c0d Remove unneeded functools import. 2016-04-07 08:37:25 +01:00
Cory Benfield 8000def20c Refactor unquote_unreserved to be simpler. 2016-04-07 08:36:35 +01:00
Cory Benfield c26e82ed87 Add test for Issue 2653. 2016-04-07 08:36:35 +01:00
Cory Benfield e68dd5dca0 Get tests passing on Python 3. 2016-04-07 08:35:30 +01:00
Cory Benfield a3532632af Unicode/bytes tests for unquote_unreserved 2016-04-07 08:35:30 +01:00
Cory Benfield 5530091b86 Enhance unquote_unreserved to handle all strings 2016-04-07 08:35:30 +01:00
Cory Benfield d185a40aaf Split on bytestrings. 2016-04-07 08:35:30 +01:00
Cory Benfield aedc0e515d Handle complex redirect URIs on Python 3 2016-04-07 08:35:30 +01:00
Cory Benfield b644af0ec7 Make sure we build environment settings properly. 2016-04-07 08:34:12 +01:00
kennethreitz f0860bd3ca Merge pull request #3048 from Stranger6667/test-structures
Added unit tests for structures module
2016-04-06 15:06:36 -04:00
kennethreitz 456be3cfde Merge pull request #3024 from Stranger6667/utils-unit-tests
Added unit tests for utils module
2016-04-06 15:05:13 -04:00
kennethreitz b6b1b3a81c Merge pull request #3049 from Stranger6667/test-hooks
Added unit tests for hooks module
2016-04-06 15:04:15 -04:00
kennethreitz 90578795eb Update HISTORY.rst 2016-04-06 15:02:06 -04:00
kennethreitz 03ed671a41 Merge pull request #3059 from alexanderad/proxy-connection-errors
Raise a ProxyError for proxy related connection issues
2016-04-06 15:01:25 -04:00
Cory Benfield e576f98429 Merge pull request #3069 from achermes/master
Update docstring and API doc to document ability to add per-file headers in multipart POST
2016-03-29 12:31:57 +01:00
Alexander Hermes b8a577050d Update docstring and API doc to document ability to add per-file headers in multipart POST
* Docstring only change - for the function itself cf. requests Issue #1640
2016-03-29 11:57:47 +01:00
Ian Cordasco 3acf3a7238 Merge pull request #3060 from benweatherman/master
Consolidate logic for changing method during redirects
2016-03-20 13:46:00 -05:00