Commit Graph

2243 Commits

Author SHA1 Message Date
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
Kenneth Reitz b73426aaca exactly 2012-10-17 22:45:24 -07:00
Kenneth Reitz aa08f33f98 Merge pull request #884 from everbird/develop
Support CJK parameters when post files
2012-10-17 07:21:39 -07:00
Kenneth Reitz c631627403 Merge pull request #887 from rvoicilas/develop
Small changes to make the code more PEP8 compliant
2012-10-17 07:20:55 -07:00
Kenneth Reitz 2363243964 Merge pull request #897 from ametaireau/fix-cheeseshop-mirror-url
Fix the cheeseshop mirror url from pip.kennethreitz to crate.io
2012-10-17 06:37:26 -07:00
Alexis Métaireau 78dbb5bfbe Fix the cheeseshop mirror url from pip.kennethreitz to crate.io, since the former doesn't work anymore. 2012-10-17 15:28:09 +02:00
Kenneth Reitz 1a0af611cb Merge pull request #892 from treyhunner/topic/whitespace-fixes
Fix multiple code style (whitespace) in docs/
2012-10-15 12:55:51 -07:00
Trey Hunner 481622ff16 Fix multiple code style (whitespace) in docs/ 2012-10-15 11:17:09 -07:00
Kenneth Reitz 9840966d72 typo all the things 2012-10-13 00:46:46 +01:00
Kenneth Reitz c3fc2dd259 Merge remote-tracking branch 'origin/develop' into develop 2012-10-13 00:45:20 +01:00
Kenneth Reitz f33a0aa47b oauth awesomeness 2012-10-13 00:45:05 +01:00
Stephen Zhuang bb9e72885a For the uniformity :) 2012-10-09 23:19:42 +08:00
Stephen Zhuang 2d9f953d4c Add name to AUTHORS according to Contribute section 2012-10-09 11:20:48 +08:00
Radu Voicilas 820dfb0495 Making the code more PEP8 compliant 2012-10-09 00:42:49 +03:00
tokuda109 5ec2c96f02 declare the encoding 2012-10-09 00:42:49 +03:00
Kenneth Reitz 3e30196917 update 2012-10-09 00:42:49 +03:00
Kenneth Reitz cc1b9da235 wording 2012-10-09 00:42:49 +03:00
Kenneth Reitz 1444d9033a padding 2012-10-09 00:42:49 +03:00
Kenneth Reitz e60e82c729 order fix 2012-10-09 00:42:49 +03:00
Kenneth Reitz 582a53f3f4 why not 2012-10-09 00:42:49 +03:00
Ian Cordasco 4e6cf21d82 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.
2012-10-09 00:42:49 +03:00
Kenneth Reitz 46fd297c3a new classifiers for 3.2+ 2012-10-09 00:42:49 +03:00
Kenneth Reitz ed8a3f3199 v0.14.1 2012-10-09 00:42:48 +03:00
yegle 22fdecba52 Update: @property decorator instead of __getattr__ 2012-10-09 00:42:48 +03:00
Kunal Mehta 4f9e552148 Use __iter__ rather than the inefficient nested for loops 2012-10-09 00:42:48 +03:00
yegle e656222188 Python 3.3 compatible update
httplib.cookiejar.DefaultCookiePolicy changed its implementation of
set_ok_verifiability.
2012-10-09 00:42:48 +03:00
Matt Sweeney eb6a6b1a23 Simplify error handling when decoding unicode 2012-10-09 00:42:48 +03:00
Matt Sweeney 2bb49ff386 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
2012-10-09 00:42:48 +03:00
Stephen Zhuang 86b39bf3e3 Support CJK parameters when post files 2012-10-08 16:52:06 +08:00
Kenneth Reitz 0c0254453f Merge pull request #878 from tokuda109/encoding
miss the encoding declaration
2012-10-02 08:25:16 -07:00
tokuda109 601a2b8c74 declare the encoding 2012-10-02 23:26:29 +09:00
Kenneth Reitz 490ed74187 update 2012-10-02 01:02:32 -04:00