services/python-requests.git
11 years agoAvoid using callable().
Cory Benfield [Sat, 24 Nov 2012 12:15:30 +0000 (12:15 +0000)]
Avoid using callable().

Callable() is not included in Python 3.1, so we shouldn't use it.

11 years agoMerge pull request #942 from Lukasa/issue883
Kenneth Reitz [Fri, 23 Nov 2012 10:04:21 +0000 (02:04 -0800)]
Merge pull request #942 from Lukasa/issue883

MockRequest needs a type property for Py3.3

11 years agoMerge pull request #945 from Lukasa/develop
Kenneth Reitz [Fri, 23 Nov 2012 10:03:28 +0000 (02:03 -0800)]
Merge pull request #945 from Lukasa/develop

Respect the no_proxy environment variable.

11 years agoMerge pull request #947 from JohnPeacockMessageSystems/develop
Kenneth Reitz [Fri, 23 Nov 2012 10:02:18 +0000 (02:02 -0800)]
Merge pull request #947 from JohnPeacockMessageSystems/develop

Only return a path if the cacert.pem file exists.

11 years agoMerge pull request #948 from mwielgoszewski/develop
Kenneth Reitz [Fri, 23 Nov 2012 10:01:20 +0000 (02:01 -0800)]
Merge pull request #948 from mwielgoszewski/develop

Back to issue #630, .isalnum() was sufficient in addressing the issue.

11 years agoBack to issue #630, .isalnum() was sufficient in addressing the issue.
Marcin Wielgoszewski [Thu, 22 Nov 2012 16:10:22 +0000 (11:10 -0500)]
Back to issue #630, .isalnum() was sufficient in addressing the issue.
Adding a try/except block just masks any issues that are raised here, issues that the developer should definitely be made aware of.

11 years agoMerge remote-tracking branch 'origin/develop' into develop
Kenneth Reitz [Wed, 21 Nov 2012 22:59:11 +0000 (17:59 -0500)]
Merge remote-tracking branch 'origin/develop' into develop

11 years agoobama
Kenneth Reitz [Wed, 21 Nov 2012 22:58:13 +0000 (17:58 -0500)]
obama

11 years agoMerge branch 'develop' of github.com:JohnPeacockMessageSystems/requests into develop
John Peacock [Wed, 21 Nov 2012 18:41:39 +0000 (13:41 -0500)]
Merge branch 'develop' of github.com:JohnPeacockMessageSystems/requests into develop

11 years agoOnly return a path if the cacert.pem file exists.
John Peacock [Wed, 21 Nov 2012 18:41:16 +0000 (13:41 -0500)]
Only return a path if the cacert.pem file exists.

This will permit the deletion of just that one file in order
to fall back to the [probably more accurate but less consistent]
Distro provided CA certs.

11 years agoOnly return a path if the cacert.pem file exists.
John Peacock [Wed, 21 Nov 2012 18:34:03 +0000 (13:34 -0500)]
Only return a path if the cacert.pem file exists.

This will permit the deletion of just that one file in order
to fall back to the [probably more accurate but less consistent]
Distro provided CA certs.

11 years agoMake sure we reset environment variables.
Cory Benfield [Sun, 18 Nov 2012 12:31:55 +0000 (12:31 +0000)]
Make sure we reset environment variables.

Turns out nose runs all the tests in one process, so changing the
os.environ dictionary makes everything go horribly wrong.

11 years agoRespect the no_proxy environment variable.
Cory Benfield [Sun, 18 Nov 2012 12:06:33 +0000 (12:06 +0000)]
Respect the no_proxy environment variable.

This change is in response to issue #879.

11 years agoMockRequest needs a type property for Py3.3
Cory Benfield [Sat, 17 Nov 2012 13:00:39 +0000 (13:00 +0000)]
MockRequest needs a type property for Py3.3

11 years agoMerge pull request #940 from Lukasa/issue917
Kenneth Reitz [Sat, 17 Nov 2012 11:03:32 +0000 (03:03 -0800)]
Merge pull request #940 from Lukasa/issue917

Update docs to reflect use of params

11 years agoMerge pull request #941 from Lukasa/issue870
Kenneth Reitz [Sat, 17 Nov 2012 11:03:03 +0000 (03:03 -0800)]
Merge pull request #941 from Lukasa/issue870

Update documentation on Sessions.

11 years agoUpdate documentation on Sessions.
Cory Benfield [Sat, 17 Nov 2012 10:57:26 +0000 (10:57 +0000)]
Update documentation on Sessions.

This resolves issue #870. Better documentation here should be considered
for further work.

11 years agoUpdate docs to reflect use of params
Cory Benfield [Fri, 16 Nov 2012 23:05:35 +0000 (23:05 +0000)]
Update docs to reflect use of params

Resolves issue #917.

11 years agoMerge pull request #925 from russelldavis/fix-encoding
Kenneth Reitz [Thu, 15 Nov 2012 10:13:30 +0000 (02:13 -0800)]
Merge pull request #925 from russelldavis/fix-encoding

Fix a bug in _encode_params

11 years agoMerge pull request #937 from cleg/develop
Kenneth Reitz [Thu, 15 Nov 2012 10:11:55 +0000 (02:11 -0800)]
Merge pull request #937 from cleg/develop

Fix for default_user_agent when SIGCHILD intercepted

11 years agoFix for user-agent setting
Pavel Dmitriev [Tue, 13 Nov 2012 15:40:13 +0000 (17:40 +0200)]
Fix for user-agent setting

11 years agoMerge pull request #930 from maxcountryman/status-codes
Kenneth Reitz [Fri, 9 Nov 2012 00:24:36 +0000 (16:24 -0800)]
Merge pull request #930 from maxcountryman/status-codes

adding UTF-8 status codes

11 years agoadding UTF-8 status codes
Max Countryman [Thu, 8 Nov 2012 22:30:13 +0000 (14:30 -0800)]
adding UTF-8 status codes

11 years agoMerge pull request #921 from bmcustodio/setuptools-fixes
Kenneth Reitz [Thu, 8 Nov 2012 06:08:32 +0000 (22:08 -0800)]
Merge pull request #921 from bmcustodio/setuptools-fixes

Added 'zip_safe' flag to 'setup.py' & Fixed typo in 'MANIFEST.in'

11 years agoFix a bug in _encode_params - it wasn't utf-8 encoding strings in values that
Russell Davis [Sat, 3 Nov 2012 19:58:04 +0000 (12:58 -0700)]
Fix a bug in _encode_params - it wasn't utf-8 encoding strings in values that
are iterable but not a list.

11 years agoFixed typo in 'MANIFEST.in'.
bmcustodio [Tue, 30 Oct 2012 15:20:29 +0000 (15:20 +0000)]
Fixed typo in 'MANIFEST.in'.

11 years agoAdded 'zip_safe' flag to 'setup.py'.
bmcustodio [Tue, 30 Oct 2012 15:20:08 +0000 (15:20 +0000)]
Added 'zip_safe' flag to 'setup.py'.

11 years agov0.14.2 v0.14.2
Kenneth Reitz [Sat, 27 Oct 2012 15:08:40 +0000 (10:08 -0500)]
v0.14.2

11 years agov0.14.2
Kenneth Reitz [Sat, 27 Oct 2012 15:08:16 +0000 (10:08 -0500)]
v0.14.2

11 years agoMerge pull request #909 from mjpieters/issue765-json-encodings
Kenneth Reitz [Sat, 27 Oct 2012 15:02:55 +0000 (08:02 -0700)]
Merge pull request #909 from mjpieters/issue765-json-encodings

Use a JSON-specific encoding detection when no encoding has been specified

11 years agoMerge pull request #912 from jhalcrow/develop
Kenneth Reitz [Sat, 27 Oct 2012 15:01:17 +0000 (08:01 -0700)]
Merge pull request #912 from jhalcrow/develop

Make sure that url has fragment removed when using a proxy

11 years agoMake sure that url has fragment removed when using a proxy
Jonathan Halcrow [Sat, 27 Oct 2012 13:54:31 +0000 (09:54 -0400)]
Make sure that url has fragment removed when using a proxy

11 years agoFix the smoke test in the face of UTF-16 surrogate pairs.
Martijn Pieters [Fri, 26 Oct 2012 10:15:27 +0000 (12:15 +0200)]
Fix the smoke test in the face of UTF-16 surrogate pairs.

If the random data starts with a UTF-16 BOM *and* the next two bytes are for a character in the `\ud800`-`\udfff` range decoding would fail. Small chance, but still possible.

Extend it to check the UTF-8 error as well. The goal is to test that the guesser was *mostly* correct, and to verify the cases where it wasn't that it was to be expected. Most of all that the function doesn't buckle under wildly unexpected data.

11 years agoBetter not call it `chr`, rename to `byteschr`.
Martijn Pieters [Thu, 25 Oct 2012 16:27:21 +0000 (18:27 +0200)]
Better not call it `chr`, rename to `byteschr`.

11 years agoRedefine the `unichr` and bytes-variant of `chr` at module level.
Martijn Pieters [Thu, 25 Oct 2012 16:22:07 +0000 (18:22 +0200)]
Redefine the `unichr` and bytes-variant of `chr` at module level.

Needed to appease Travis; it's python 2.6 and 2.7 builds are weird and the `__builtins__` dict is not following CPython conventions.

11 years agoCheek: insert myself into AUTHORS.rst.
Martijn Pieters [Thu, 25 Oct 2012 16:12:55 +0000 (18:12 +0200)]
Cheek: insert myself into AUTHORS.rst.

11 years agoCorrect a c&p mistake: set a correct docstring for the unit test class.
Martijn Pieters [Thu, 25 Oct 2012 15:56:19 +0000 (17:56 +0200)]
Correct a c&p mistake: set a correct docstring for the unit test class.

11 years agoUse a JSON-specific encoding detection when no encoding has been specified.
Martijn Pieters [Thu, 25 Oct 2012 15:43:52 +0000 (17:43 +0200)]
Use a JSON-specific encoding detection when no encoding has been specified.

JSON *must* be encoded using UTF-8, UTF-16 or UTF-32 (see the [RFC][1]; detect the encoding based on the fact that JSON always starts with 2 ASCII characters.

[1]: http://tools.ietf.org/html/rfc4627#section-3

11 years agoMerge pull request #906 from Atheuz/develop
Kenneth Reitz [Mon, 22 Oct 2012 23:49:15 +0000 (16:49 -0700)]
Merge pull request #906 from Atheuz/develop

quote_plus, unquote_plus added

11 years agoquote_plus, unquote_plus added
Lasse Vang Gravesen [Mon, 22 Oct 2012 21:58:49 +0000 (23:58 +0200)]
quote_plus, unquote_plus added

compat.py: relevant imports added
utils.py: then those imports are imported here.

Nothing else was changed, but I saw mentions of quoting later in
utils.py but I wasnt sure what to do about that.

11 years agoMerge pull request #903 from building39/issue-901
Kenneth Reitz [Sun, 21 Oct 2012 15:52:03 +0000 (08:52 -0700)]
Merge pull request #903 from building39/issue-901

Issue 901:

11 years agoMerge pull request #904 from g2p/develop
Kenneth Reitz [Sun, 21 Oct 2012 15:49:38 +0000 (08:49 -0700)]
Merge pull request #904 from g2p/develop

Remove path hacks that break chardet in Python 3. Closes #858.

11 years agoRemove path hacks that break chardet in Python 3. Closes #858.
Gabriel [Sun, 21 Oct 2012 14:49:50 +0000 (16:49 +0200)]
Remove path hacks that break chardet in Python 3. Closes #858.

This replaces the sys.path hack with a slightly less objectionable
sys.modules hack.

Both have the effect of making the vendored lib's absolue imports work
as expected when oauthlib isn't installed. The sys.modules hack doesn't
insert the rest of the vendored crap in a global path, however.

11 years agoMerge pull request #898 from rvoicilas/develop
Kenneth Reitz [Sat, 20 Oct 2012 12:37:57 +0000 (05:37 -0700)]
Merge pull request #898 from rvoicilas/develop

Replace assert statements with unittest's self.assert*

11 years agoIssue 901:
mmartin [Fri, 19 Oct 2012 19:17:32 +0000 (14:17 -0500)]
Issue 901:
Make value of Contents-Encoding header case insensitive per RFC 2616.

11 years agoReplace assert statements with unittest's self.assert*
Radu Voicilas [Thu, 18 Oct 2012 19:24:59 +0000 (22:24 +0300)]
Replace assert statements with unittest's self.assert*

-- the incetive for this being that with self.assertEqual you get an
error message if the test fails

11 years agoMerge remote-tracking branch 'origin/develop' into develop
Kenneth Reitz [Thu, 18 Oct 2012 05:46:12 +0000 (22:46 -0700)]
Merge remote-tracking branch 'origin/develop' into develop

11 years agoexactly
Kenneth Reitz [Thu, 18 Oct 2012 05:45:24 +0000 (22:45 -0700)]
exactly

11 years agoMerge pull request #884 from everbird/develop
Kenneth Reitz [Wed, 17 Oct 2012 14:21:39 +0000 (07:21 -0700)]
Merge pull request #884 from everbird/develop

Support CJK parameters when post files

11 years agoMerge pull request #887 from rvoicilas/develop
Kenneth Reitz [Wed, 17 Oct 2012 14:20:55 +0000 (07:20 -0700)]
Merge pull request #887 from rvoicilas/develop

Small changes to make the code more PEP8 compliant

11 years agoMerge pull request #897 from ametaireau/fix-cheeseshop-mirror-url
Kenneth Reitz [Wed, 17 Oct 2012 13:37:26 +0000 (06:37 -0700)]
Merge pull request #897 from ametaireau/fix-cheeseshop-mirror-url

Fix the cheeseshop mirror url from pip.kennethreitz to crate.io

11 years agoFix the cheeseshop mirror url from pip.kennethreitz to crate.io, since the former...
Alexis Métaireau [Wed, 17 Oct 2012 13:28:09 +0000 (15:28 +0200)]
Fix the cheeseshop mirror url from pip.kennethreitz to crate.io, since the former doesn't work anymore.

11 years agoMerge pull request #892 from treyhunner/topic/whitespace-fixes
Kenneth Reitz [Mon, 15 Oct 2012 19:55:51 +0000 (12:55 -0700)]
Merge pull request #892 from treyhunner/topic/whitespace-fixes

Fix multiple code style (whitespace) in docs/

11 years agoFix multiple code style (whitespace) in docs/
Trey Hunner [Mon, 15 Oct 2012 18:17:09 +0000 (11:17 -0700)]
Fix multiple code style (whitespace) in docs/

11 years agotypo all the things
Kenneth Reitz [Fri, 12 Oct 2012 23:46:46 +0000 (00:46 +0100)]
typo all the things

11 years agoMerge remote-tracking branch 'origin/develop' into develop
Kenneth Reitz [Fri, 12 Oct 2012 23:45:20 +0000 (00:45 +0100)]
Merge remote-tracking branch 'origin/develop' into develop

11 years agooauth awesomeness
Kenneth Reitz [Fri, 12 Oct 2012 23:45:05 +0000 (00:45 +0100)]
oauth awesomeness

11 years agoFor the uniformity :)
Stephen Zhuang [Tue, 9 Oct 2012 15:19:42 +0000 (23:19 +0800)]
For the uniformity :)

11 years agoAdd name to AUTHORS according to Contribute section
Stephen Zhuang [Tue, 9 Oct 2012 03:20:48 +0000 (11:20 +0800)]
Add name to AUTHORS according to Contribute section

11 years agoMaking the code more PEP8 compliant
Radu Voicilas [Mon, 8 Oct 2012 21:41:42 +0000 (00:41 +0300)]
Making the code more PEP8 compliant

11 years agodeclare the encoding
tokuda109 [Tue, 2 Oct 2012 14:26:10 +0000 (23:26 +0900)]
declare the encoding

11 years agoupdate
Kenneth Reitz [Tue, 2 Oct 2012 05:02:32 +0000 (01:02 -0400)]
update

11 years agowording
Kenneth Reitz [Tue, 2 Oct 2012 05:01:28 +0000 (01:01 -0400)]
wording

11 years agopadding
Kenneth Reitz [Tue, 2 Oct 2012 04:44:57 +0000 (00:44 -0400)]
padding

11 years agoorder fix
Kenneth Reitz [Tue, 2 Oct 2012 04:44:21 +0000 (00:44 -0400)]
order fix

11 years agowhy not
Kenneth Reitz [Tue, 2 Oct 2012 04:43:21 +0000 (00:43 -0400)]
why not

11 years agoOnly register callable items in lists
Ian Cordasco [Mon, 1 Oct 2012 17:09:02 +0000 (13:09 -0400)]
Only register callable items in lists

Prior to this, you could sneak a list of anything to register_hook and it
would accept it. This will check if the items in the list are callable before
registering them. Also added a regression test to make sure if this gets
changed it will be noticed.

11 years agonew classifiers for 3.2+
Kenneth Reitz [Mon, 1 Oct 2012 17:30:41 +0000 (13:30 -0400)]
new classifiers for 3.2+

11 years agov0.14.1
Kenneth Reitz [Mon, 1 Oct 2012 17:29:38 +0000 (13:29 -0400)]
v0.14.1

11 years agoUpdate: @property decorator instead of __getattr__
yegle [Mon, 1 Oct 2012 17:13:12 +0000 (13:13 -0400)]
Update: @property decorator instead of __getattr__

11 years agoUse __iter__ rather than the inefficient nested for loops
Kunal Mehta [Mon, 1 Oct 2012 00:24:56 +0000 (19:24 -0500)]
Use __iter__ rather than the inefficient nested for loops

11 years agoPython 3.3 compatible update
yegle [Sat, 29 Sep 2012 22:28:53 +0000 (18:28 -0400)]
Python 3.3 compatible update

httplib.cookiejar.DefaultCookiePolicy changed its implementation of
set_ok_verifiability.

11 years agoSimplify error handling when decoding unicode
Matt Sweeney [Wed, 26 Sep 2012 19:38:36 +0000 (12:38 -0700)]
Simplify error handling when decoding unicode

11 years agoHandle encoding of `None` when decoding unicode
Matt Sweeney [Tue, 25 Sep 2012 22:35:30 +0000 (15:35 -0700)]
Handle encoding of `None` when decoding unicode

If encoding is None, decoding will throw the following TypeError:
TypeError: unicode() argument 2 must be string, not None

If this is the case, attempt to run without any set encoding

11 years agoSupport CJK parameters when post files
Stephen Zhuang [Mon, 8 Oct 2012 08:52:06 +0000 (16:52 +0800)]
Support CJK parameters when post files

11 years agoMerge pull request #878 from tokuda109/encoding
Kenneth Reitz [Tue, 2 Oct 2012 15:25:16 +0000 (08:25 -0700)]
Merge pull request #878 from tokuda109/encoding

miss the encoding declaration

11 years agodeclare the encoding
tokuda109 [Tue, 2 Oct 2012 14:26:10 +0000 (23:26 +0900)]
declare the encoding

11 years agoupdate
Kenneth Reitz [Tue, 2 Oct 2012 05:02:32 +0000 (01:02 -0400)]
update

11 years agowording
Kenneth Reitz [Tue, 2 Oct 2012 05:01:28 +0000 (01:01 -0400)]
wording

11 years agopadding
Kenneth Reitz [Tue, 2 Oct 2012 04:44:57 +0000 (00:44 -0400)]
padding

11 years agoorder fix
Kenneth Reitz [Tue, 2 Oct 2012 04:44:21 +0000 (00:44 -0400)]
order fix

11 years agoMerge remote-tracking branch 'origin/develop' into develop
Kenneth Reitz [Tue, 2 Oct 2012 04:43:28 +0000 (00:43 -0400)]
Merge remote-tracking branch 'origin/develop' into develop

11 years agowhy not
Kenneth Reitz [Tue, 2 Oct 2012 04:43:21 +0000 (00:43 -0400)]
why not

11 years agoMerge pull request #876 from sigmavirus24/register_hook_fix
Kenneth Reitz [Mon, 1 Oct 2012 18:15:47 +0000 (11:15 -0700)]
Merge pull request #876 from sigmavirus24/register_hook_fix

Only register callable items in lists

11 years agoOnly register callable items in lists
Ian Cordasco [Mon, 1 Oct 2012 17:09:02 +0000 (13:09 -0400)]
Only register callable items in lists

Prior to this, you could sneak a list of anything to register_hook and it
would accept it. This will check if the items in the list are callable before
registering them. Also added a regression test to make sure if this gets
changed it will be noticed.

11 years agonew classifiers for 3.2+
Kenneth Reitz [Mon, 1 Oct 2012 17:30:41 +0000 (13:30 -0400)]
new classifiers for 3.2+

11 years agov0.14.1 v0.14.1
Kenneth Reitz [Mon, 1 Oct 2012 17:29:38 +0000 (13:29 -0400)]
v0.14.1

11 years agoMerge pull request #871 from yegle/develop
Kenneth Reitz [Mon, 1 Oct 2012 17:26:58 +0000 (10:26 -0700)]
Merge pull request #871 from yegle/develop

Python 3.3 compatible update

11 years agoUpdate: @property decorator instead of __getattr__
yegle [Mon, 1 Oct 2012 17:13:12 +0000 (13:13 -0400)]
Update: @property decorator instead of __getattr__

11 years agoMerge pull request #867 from mattswe/patch-1
Kenneth Reitz [Mon, 1 Oct 2012 16:53:56 +0000 (09:53 -0700)]
Merge pull request #867 from mattswe/patch-1

Handle encoding of `None` when decoding unicode

11 years agoMerge pull request #873 from legoktm/develop
Kenneth Reitz [Mon, 1 Oct 2012 16:52:31 +0000 (09:52 -0700)]
Merge pull request #873 from legoktm/develop

Use __iter__ rather than the inefficient nested for loops

11 years agoUse __iter__ rather than the inefficient nested for loops
Kunal Mehta [Mon, 1 Oct 2012 00:24:56 +0000 (19:24 -0500)]
Use __iter__ rather than the inefficient nested for loops

11 years agoPython 3.3 compatible update
yegle [Sat, 29 Sep 2012 22:28:53 +0000 (18:28 -0400)]
Python 3.3 compatible update

httplib.cookiejar.DefaultCookiePolicy changed its implementation of
set_ok_verifiability.

11 years agoSimplify error handling when decoding unicode
Matt Sweeney [Wed, 26 Sep 2012 19:38:36 +0000 (12:38 -0700)]
Simplify error handling when decoding unicode

11 years agoHandle encoding of `None` when decoding unicode
Matt Sweeney [Tue, 25 Sep 2012 22:35:30 +0000 (15:35 -0700)]
Handle encoding of `None` when decoding unicode

If encoding is None, decoding will throw the following TypeError:
TypeError: unicode() argument 2 must be string, not None

If this is the case, attempt to run without any set encoding

11 years agoRevert "Fix SSL3 error on Ubuntu 12.04"
Kenneth Reitz [Mon, 24 Sep 2012 16:05:53 +0000 (11:05 -0500)]
Revert "Fix SSL3 error on Ubuntu 12.04"

This reverts commit c19650b00f0c169cdf6372a093425830e11a8771.

11 years agochange default accept-encoding
Kenneth Reitz [Sun, 23 Sep 2012 17:41:54 +0000 (12:41 -0500)]
change default accept-encoding

http://blogs.operationaldynamics.com/andrew/software/research/testing-re
stful-apis-with-httpie

11 years agoamazon
Kenneth Reitz [Sun, 23 Sep 2012 16:46:53 +0000 (11:46 -0500)]
amazon

11 years agoMerge pull request #863 from sigmavirus24/fix_hooks
Kenneth Reitz [Sun, 23 Sep 2012 01:49:19 +0000 (18:49 -0700)]
Merge pull request #863 from sigmavirus24/fix_hooks

Fix #785 & add regression test.

11 years ago1,000,000
Kenneth Reitz [Fri, 21 Sep 2012 22:50:38 +0000 (15:50 -0700)]
1,000,000