services/python-requests.git
11 years agoMerge branch 'master' of github.com:kennethreitz/requests
Kenneth Reitz [Thu, 29 Nov 2012 16:35:35 +0000 (08:35 -0800)]
Merge branch 'master' of github.com:kennethreitz/requests

Conflicts:
requests/compat.py
setup.py

11 years agocharade
Kenneth Reitz [Thu, 29 Nov 2012 16:30:07 +0000 (08:30 -0800)]
charade

11 years agoout with chardet, in with charade
Kenneth Reitz [Thu, 29 Nov 2012 16:29:02 +0000 (08:29 -0800)]
out with chardet, in with charade

11 years agoMerge pull request #973 from sigmavirus24/fix_972
Kenneth Reitz [Wed, 28 Nov 2012 16:40:09 +0000 (08:40 -0800)]
Merge pull request #973 from sigmavirus24/fix_972

Fix #972

11 years agoMerge pull request #976 from futoase/master
Kenneth Reitz [Wed, 28 Nov 2012 16:33:56 +0000 (08:33 -0800)]
Merge pull request #976 from futoase/master

Repaired import error.

11 years agoModified: Change the import statement.
Keiji Matsuzaki [Wed, 28 Nov 2012 16:29:13 +0000 (01:29 +0900)]
Modified: Change the import statement.

11 years agoFix #972
Ian Cordasco [Wed, 28 Nov 2012 03:14:09 +0000 (22:14 -0500)]
Fix #972

Someone forgot a comma

11 years agofixes for python2
Kenneth Reitz [Tue, 27 Nov 2012 21:08:16 +0000 (13:08 -0800)]
fixes for python2

11 years agofix chardet import
Kenneth Reitz [Tue, 27 Nov 2012 20:52:17 +0000 (12:52 -0800)]
fix chardet import

11 years agoremove safe mode
Kenneth Reitz [Tue, 27 Nov 2012 20:42:11 +0000 (12:42 -0800)]
remove safe mode

11 years agoremove danger mode
Kenneth Reitz [Tue, 27 Nov 2012 20:41:28 +0000 (12:41 -0800)]
remove danger mode

11 years agoremove strict mode
Kenneth Reitz [Tue, 27 Nov 2012 20:41:12 +0000 (12:41 -0800)]
remove strict mode

11 years agothat shouldn't be neccesary anymore
Kenneth Reitz [Tue, 27 Nov 2012 20:37:59 +0000 (12:37 -0800)]
that shouldn't be neccesary anymore

11 years agochardet2 is magic
Kenneth Reitz [Tue, 27 Nov 2012 20:36:29 +0000 (12:36 -0800)]
chardet2 is magic

11 years agofix setup.py for oauth removal
Kenneth Reitz [Tue, 27 Nov 2012 19:48:17 +0000 (11:48 -0800)]
fix setup.py for oauth removal

11 years agono more oauth
Kenneth Reitz [Tue, 27 Nov 2012 19:47:17 +0000 (11:47 -0800)]
no more oauth

11 years agolawyer up, v2
Kenneth Reitz [Tue, 27 Nov 2012 19:32:59 +0000 (11:32 -0800)]
lawyer up, v2

11 years agoMerge pull request #967 from matthewlmcclure/sign-without-body
Kenneth Reitz [Tue, 27 Nov 2012 18:43:57 +0000 (10:43 -0800)]
Merge pull request #967 from matthewlmcclure/sign-without-body

Sign requests even if they have no body data.

11 years agoSign requests even if they have no body data.
Matt McClure [Tue, 27 Nov 2012 18:12:21 +0000 (13:12 -0500)]
Sign requests even if they have no body data.

11 years agoMerge remote-tracking branch 'origin/develop' into develop
Kenneth Reitz [Tue, 27 Nov 2012 04:50:09 +0000 (20:50 -0800)]
Merge remote-tracking branch 'origin/develop' into develop

11 years agohow was that still there?
Kenneth Reitz [Tue, 27 Nov 2012 01:27:35 +0000 (17:27 -0800)]
how was that still there?

11 years agoMerge pull request #962 from sigmavirus24/dev_docs
Kenneth Reitz [Mon, 26 Nov 2012 20:26:38 +0000 (12:26 -0800)]
Merge pull request #962 from sigmavirus24/dev_docs

Add a bit more to the developer's documentation

11 years agoAdd a bit more to the developer's documentation
Ian Cordasco [Mon, 26 Nov 2012 18:23:38 +0000 (13:23 -0500)]
Add a bit more to the developer's documentation

I'm not sure what else could be added to satisfy #601. If this is sufficient,
I suggest closing that.

11 years agoMerge pull request #956 from Lukasa/issue910
Kenneth Reitz [Mon, 26 Nov 2012 08:40:27 +0000 (00:40 -0800)]
Merge pull request #956 from Lukasa/issue910

Try to resolve OAuth+JSON problems.

11 years agoMerge pull request #953 from heyman/fix_session_safe_mode
Kenneth Reitz [Mon, 26 Nov 2012 08:31:45 +0000 (00:31 -0800)]
Merge pull request #953 from heyman/fix_session_safe_mode

Fixes so that safe_mode works for Sessions

11 years agoMerge pull request #955 from Lukasa/issue882
Kenneth Reitz [Mon, 26 Nov 2012 08:30:49 +0000 (00:30 -0800)]
Merge pull request #955 from Lukasa/issue882

Python 3.1 compatibility.

11 years agoMerge pull request #957 from sigmavirus24/fix_223
Kenneth Reitz [Sun, 25 Nov 2012 03:54:29 +0000 (19:54 -0800)]
Merge pull request #957 from sigmavirus24/fix_223

Attach Content-Length to everything.

11 years agoFix python 3 tests.
Ian Cordasco [Sun, 25 Nov 2012 03:43:52 +0000 (22:43 -0500)]
Fix python 3 tests.

11 years agoHandle files as well.
Ian Cordasco [Sun, 25 Nov 2012 03:01:16 +0000 (22:01 -0500)]
Handle files as well.

11 years agoAttach Content-Length to everything.
Ian Cordasco [Sun, 25 Nov 2012 02:47:47 +0000 (21:47 -0500)]
Attach Content-Length to everything.

Closes #223

11 years agoMake OAuth handle less-common body data better.
Cory Benfield [Sat, 24 Nov 2012 21:17:29 +0000 (21:17 +0000)]
Make OAuth handle less-common body data better.

Related to Issue #910. Specifically, OAuth won't sign the request unless
it gets a body type that is urlencoded or multipart. This is overly
restrictive. The correct behaviour is to sign the message without
including the body as part of the signature.

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 agoFixed so that safe_mode works for Sessions
Jonatan Heyman [Fri, 23 Nov 2012 15:48:51 +0000 (16:48 +0100)]
Fixed so that safe_mode works for Sessions

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

12 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

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

12 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'

12 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.

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

12 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'.

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

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

12 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

12 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

12 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

12 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.

12 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`.

12 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.

12 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.

12 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.

12 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

12 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

12 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.

12 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:

12 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.

12 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.

12 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*

12 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.

12 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

12 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

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

12 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

12 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

12 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

12 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.

12 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/

12 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/

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

12 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

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

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

12 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

12 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

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

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

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

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

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

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

12 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.

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