Commit Graph

2274 Commits

Author SHA1 Message Date
Kenneth Reitz 5ee00a75e0 Merge pull request #957 from sigmavirus24/fix_223
Attach Content-Length to everything.
2012-11-24 19:54:29 -08:00
Ian Cordasco b93fbd30c3 Fix python 3 tests. 2012-11-24 22:43:52 -05:00
Ian Cordasco 61f16d1ddc Handle files as well. 2012-11-24 22:02:14 -05:00
Ian Cordasco f003025a37 Attach Content-Length to everything.
Closes #223
2012-11-24 21:47:47 -05:00
Kenneth Reitz 991f47ac08 Merge pull request #942 from Lukasa/issue883
MockRequest needs a type property for Py3.3
2012-11-23 02:04:21 -08:00
Kenneth Reitz 1d1eb994dc Merge pull request #945 from Lukasa/develop
Respect the no_proxy environment variable.
2012-11-23 02:03:28 -08:00
Kenneth Reitz 68224252e2 Merge pull request #947 from JohnPeacockMessageSystems/develop
Only return a path if the cacert.pem file exists.
2012-11-23 02:02:18 -08:00
Kenneth Reitz 36c32aead2 Merge pull request #948 from mwielgoszewski/develop
Back to issue #630, .isalnum() was sufficient in addressing the issue.
2012-11-23 02:01:20 -08:00
Marcin Wielgoszewski 18be26fc2a 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.
2012-11-22 11:10:22 -05:00
Kenneth Reitz 59dea188da Merge remote-tracking branch 'origin/develop' into develop 2012-11-21 17:59:11 -05:00
Kenneth Reitz 284deaa609 obama 2012-11-21 17:58:13 -05:00
John Peacock 68f7fae7c3 Merge branch 'develop' of github.com:JohnPeacockMessageSystems/requests into develop 2012-11-21 13:41:39 -05:00
John Peacock 20cd46426f 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.
2012-11-21 13:41:16 -05:00
John Peacock c5fddb95ed 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.
2012-11-21 13:34:03 -05:00
Cory Benfield c02520ed99 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.
2012-11-18 12:31:55 +00:00
Cory Benfield 8da100f652 Respect the no_proxy environment variable.
This change is in response to issue #879.
2012-11-18 12:06:33 +00:00
Cory Benfield b76326bf94 MockRequest needs a type property for Py3.3 2012-11-17 13:00:39 +00:00
Kenneth Reitz 50877717c8 Merge pull request #940 from Lukasa/issue917
Update docs to reflect use of params
2012-11-17 03:03:32 -08:00
Kenneth Reitz 47299421df Merge pull request #941 from Lukasa/issue870
Update documentation on Sessions.
2012-11-17 03:03:03 -08:00
Cory Benfield 0792acc130 Update documentation on Sessions.
This resolves issue #870. Better documentation here should be considered
for further work.
2012-11-17 10:57:26 +00:00
Cory Benfield c8b2f7a37b Update docs to reflect use of params
Resolves issue #917.
2012-11-16 23:05:35 +00:00
Kenneth Reitz dea8e96bd5 Merge pull request #925 from russelldavis/fix-encoding
Fix a bug in _encode_params
2012-11-15 02:13:30 -08:00
Kenneth Reitz dda2fbd1ec Merge pull request #937 from cleg/develop
Fix for default_user_agent when SIGCHILD intercepted
2012-11-15 02:11:55 -08:00
Pavel Dmitriev a02f3dec02 Fix for user-agent setting 2012-11-13 17:40:13 +02:00
Kenneth Reitz 5333ec9331 Merge pull request #930 from maxcountryman/status-codes
adding UTF-8 status codes
2012-11-08 16:24:36 -08:00
Max Countryman 32aa3eb012 adding UTF-8 status codes 2012-11-08 14:30:13 -08:00
Kenneth Reitz 5a06ffd286 Merge pull request #921 from bmcustodio/setuptools-fixes
Added 'zip_safe' flag to 'setup.py' & Fixed typo in 'MANIFEST.in'
2012-11-07 22:08:32 -08:00
Russell Davis ccf4ca8929 Fix a bug in _encode_params - it wasn't utf-8 encoding strings in values that
are iterable but not a list.
2012-11-03 12:58:04 -07:00
bmcustodio f8603918db Fixed typo in 'MANIFEST.in'. 2012-10-30 15:25:46 +00:00
bmcustodio ec852c1e5a Added 'zip_safe' flag to 'setup.py'. 2012-10-30 15:25:36 +00:00
Kenneth Reitz 63243b1e3b v0.14.2 v0.14.2 2012-10-27 10:08:40 -05:00
Kenneth Reitz 5c63bc33fe v0.14.2 2012-10-27 10:08:16 -05:00
Kenneth Reitz 28dc725cfe Merge pull request #909 from mjpieters/issue765-json-encodings
Use a JSON-specific encoding detection when no encoding has been specified
2012-10-27 08:02:55 -07:00
Kenneth Reitz 2c9bee2597 Merge pull request #912 from jhalcrow/develop
Make sure that url has fragment removed when using a proxy
2012-10-27 08:01:17 -07:00
Jonathan Halcrow 724a3889bc Make sure that url has fragment removed when using a proxy 2012-10-27 09:54:31 -04:00
Martijn Pieters e26ccb34eb 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.
2012-10-26 12:15:27 +02:00
Martijn Pieters be01a35ef1 Better not call it chr, rename to byteschr. 2012-10-25 18:27:21 +02:00
Martijn Pieters a4be9a2578 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.
2012-10-25 18:22:07 +02:00
Martijn Pieters 25f2806f23 Cheek: insert myself into AUTHORS.rst. 2012-10-25 18:12:55 +02:00
Martijn Pieters 9832bd8917 Correct a c&p mistake: set a correct docstring for the unit test class. 2012-10-25 17:56:19 +02:00
Martijn Pieters 4decc7986e 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
2012-10-25 17:43:52 +02:00
Kenneth Reitz 6e0ad1eca5 Merge pull request #906 from Atheuz/develop
quote_plus, unquote_plus added
2012-10-22 16:49:15 -07:00
Lasse Vang Gravesen b36863b2c0 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.
2012-10-22 23:58:49 +02:00
Kenneth Reitz cfa83f6214 Merge pull request #903 from building39/issue-901
Issue 901:
2012-10-21 08:52:03 -07:00
Kenneth Reitz 4778bdbaab Merge pull request #904 from g2p/develop
Remove path hacks that break chardet in Python 3. Closes #858.
2012-10-21 08:49:38 -07:00
Gabriel c03553ed4a 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.
2012-10-21 17:07:12 +02:00
Kenneth Reitz 4477d0a4e5 Merge pull request #898 from rvoicilas/develop
Replace assert statements with unittest's self.assert*
2012-10-20 05:37:57 -07:00
mmartin 4dfa51ae03 Issue 901:
Make value of Contents-Encoding header case insensitive per RFC 2616.
2012-10-19 14:17:32 -05:00
Radu Voicilas ce7c86cc58 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
2012-10-18 22:24:59 +03:00
Kenneth Reitz a74c6c6314 Merge remote-tracking branch 'origin/develop' into develop 2012-10-17 22:46:12 -07:00