Commit Graph

1892 Commits

Author SHA1 Message Date
Cory Benfield 2df3c7c75d Move to_native_string for methods to prepare() 2015-10-12 10:50:37 +01:00
Ian Cordasco 978a89d5a3 Merge pull request #2810 from Lukasa/certupdate
Update requests certificate bundle.
2015-10-08 11:12:09 -05:00
Ian Cordasco 931fd0eece Merge pull request #2814 from Lukasa/issue/2813
Use general null check for JSON
2015-10-08 10:13:08 -05:00
Cory Benfield 3948a9562d Use general null check for JSON 2015-10-08 14:53:35 +01:00
Cory Benfield f7be4e5f28 NewConnectionErrors aren't timeouts.
This is a compatibility change, and should be removed in 2.8.0
2015-10-08 14:05:17 +01:00
Cory Benfield 23051979f4 Update requests certificate bundle.
This brings it up-to-date with the certifi 2015.9.6.2 release,
specifically its `weak.pem` bundle.
2015-10-08 08:09:53 +01:00
Ian Cordasco e499b354c4 Merge pull request #2804 from Lukasa/final-2.8.0
Final 2.8.0
2015-10-05 11:21:40 -05: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 397f10bac7 Increment version numbers. 2015-10-05 15:41:04 +01:00
Cory Benfield 09bd3232dd Update urllib3 to 1.12 2015-10-05 15:38:24 +01: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
Cory Benfield f6afa71281 Merge pull request #2763 from ravipra/json_supersedes
Fixed issue #2756
2015-10-05 15:27:53 +01:00
Alexandre Sieira 2a635ba87d Update default user-agent (#2785)
* Updated default user agent so that it includes only the requests
version;
* Added PyCharm / IDEA project directory to `.gitignore`.
2015-10-05 11:18:23 -03:00
Cory Benfield 8963e1567b Merge pull request #2678 from sigmavirus24/proposed/2.8.0
Proposed 2.8.0
2015-10-05 15:09:41 +01:00
Doctor-love 63b3b9be55 Clarified description for option "trust_env" 2015-10-02 14:47:50 +02:00
sumitbinnani bf38d5bf52 Update models.py
Updated Documentation:
```data``` as well as ```files``` supersedes json
2015-10-02 13:50:52 +05:30
ueg1990 649aeaa489 Removed unused module from hooks.py 2015-09-13 06:36:39 -04:00
ueg1990 c5a41269d9 Some pythonic suggestions for requests/hooks.py 2015-09-12 20:43:25 -04:00
Usman Ehtesham Gul 96e8e8b92f Remove redundant function call list when iterating over status codes 2015-09-10 12:59:39 -04:00
Ravi Prakash Putchala 7a0cd16c1a changed the null check for 'data' parameter to be more explicit.
removed the superfluous encode from the testcase.
2015-09-09 13:04:24 +05:30
Ravi Prakash Putchala 37037607b5 Fixed issue #2756
Now 'json' parameter will be used to prepare body only if the 'data'
parameter is not present
2015-09-08 14:45:46 +05:30
Cory Benfield 56ecdebcc5 Merge pull request #2741 from jasongrout/per-host-proxy
Implement per-host proxies
2015-09-06 15:02:40 +12:00
Jason Grout 4c6540898c don't lowercase a url before urlparsing it
urlparse automatically lowercases the scheme and hostname
2015-08-28 20:20:07 +00:00
Jason Grout f3d4480a33 Use url parsing to check the scheme 2015-08-28 20:06:45 +00:00
Jason Grout c80121df91 Fix documentation for the proxies dictionary 2015-08-27 18:21:04 +00:00
Jason Grout 500f15da1f Factor out the proxy selection code 2015-08-27 18:21:04 +00:00
Jason Grout 2c8721540a Fix documentation for proxies in the Session class 2015-08-27 17:26:45 +00:00
Jason Grout d7a3aa6188 Fix another place the proxy-selecting logic is used. 2015-08-27 17:26:14 +00:00
Jason Grout 22075f02d0 Clarify the per-host proxy code 2015-08-25 18:21:20 +00:00
Everett Toews 8b03cd96cb Include file-like object in data arg description 2015-08-24 18:28:41 -05:00
Jason Grout 48fe34447d Implement per-host proxies
This change allows the proxy dict to be have entries of the form
{'<scheme>://<hostname>': '<proxy>'}.  Host-specific proxies will be used in
preference to the scheme-specific proxies (i.e., proxy dict entries with keys
like 'http' or 'https').

Fixes #2722
2015-08-24 21:16:35 +00:00
qingyunha 9d88810d52 modify proxy_headers docstrings 2015-08-24 19:48:17 +08:00
Martijn Pieters 4947cd01ae Avoid altering dictionary size during iteration, by gathering keys that need to be deleted first.
Fixes `RuntimeError` on Python 3 introduced in 53ea23128e
2015-08-21 08:44:09 +01:00
Ian Cordasco 53ea23128e Merge pull request #2706 from ak1r4/fix-merge-setting
Fix merge setting for not preserving original order of dict parameters
2015-08-15 10:39:46 -05:00
Lukas Graf f40bd0f707 Docs: Fix links to timeouts section by using :ref: instead of
linking to .html files.
2015-08-15 12:03:05 +02:00
Cory Benfield b6127ca9ca Ignore empty fields in no_proxy 2015-08-13 15:04:49 -04:00
Lukas Graf 75c1776bde Document use of sessions as context managers. 2015-08-07 20:48:03 +02:00
Cory Benfield 5d7392f140 Merge branch 'fix-merge-setting' of https://github.com/ak1r4/requests into proposed/2.8.0 2015-08-06 19:06:23 -04:00
Akira J 276202f51e Fix merge setting for not preserving original order of dict parameters 2015-08-04 22:47:12 +01:00
Ian Cordasco d7026bfb2a Upgrade urllib3 to 7fcfcd08a6a2150f93144d111904d1e4fb65c909 2015-07-18 10:43:26 -05:00
Ian Cordasco 77d7e53c12 Merge branch 'auth-digest-multi-thread' of https://github.com/exvito/requests into proposed/2.8.0 2015-07-18 10:38:58 -05:00
Ian Cordasco 1e640c8456 Merge branch 'debian-imports' of https://github.com/untitaker/requests into proposed/2.8.0 2015-07-18 10:38:30 -05:00
Susan Tan 5ec7576f23 Catch and wrap ClosedPoolError
Partially resolves #1572: "urllib3 exceptions passing through requests
API".

Inspired from Lukasa's 2605be11d82d42438ac7c3993810c955bde74cef.
2015-07-17 01:30:51 -07:00
Cory Benfield e9a1e35f89 Only pass useful timeouts to _get_conn 2015-07-03 17:00:38 +01:00
David Pursehouse 884cb7a7fb Change ignore_errors to raise_errors in get_netrc_auth
Change-Id: Ib82c7c614edafc15e5db858d9c1b9a73aebd8a95
2015-06-29 12:22:57 +09:00
David Pursehouse a560e09427 Allow get_netrc_auth to raise parse/permission errors to caller
If the netrc file exists but cannot be parsed or read, get_netrc_auth
silently fails.

Add a new argument `ignore_errors` which when set to False will cause
any parse/permission errors to be raised to the caller.  The default
value is True, which means the default behavior is unchanged.

Fixes #2654

Change-Id: I7436aaaf593178673ab84fd9e7ab4bcb0e3fe75e
2015-06-29 10:56:51 +09:00
Marc Abramowitz e3bdec5934 Display URL as part of HTTP error messages
It seems convenient to include the URL in the error message in case you
get an unexpected error.

E.g.:

    In [1]: import requests

    In [2]: resp = requests.get('http://www.google.com/eofdfdfdfdfd')

    In [3]: resp
    Out[3]: <Response [404]>

    In [4]: resp.raise_for_status()
    ---------------------------------------------------------------------------
    HTTPError                                 Traceback (most recent call last)
    <ipython-input-4-00e7077cfb5b> in <module>()
    ----> 1 resp.raise_for_status()

    /Users/marca/dev/git-repos/requests/requests/models.py in raise_for_status(self)
        835
        836         if http_error_msg:
    --> 837             raise HTTPError(http_error_msg, response=self)
        838
        839     def close(self):

    HTTPError: 404 Client Error: Not Found for url: http://www.google.com/eofdfdfdfdfd
2015-06-22 13:22:59 -07:00
Cory Benfield 2e62df456a Avoid double releasing chunked upload connections
Resolves #2636
2015-06-13 08:10:53 +01:00
colin 1da62a65d9 fix contextlib.closing bug for sessions where content is not consumed (issue #2593) 2015-05-24 15:01:34 -04:00
latyas(懒) dd0f164f8e Update cookies.py 2015-05-15 10:13:06 -05:00