Merge branch 'release/0.2.4'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Kenneth Reitz · committed by Kenneth Reitz · parents 952970f, 720d0b2 · Browse files · 8 files·+42 added−20 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
8 files+42 added−20 removed
- other:+42 added−20 removed
Provenance
- Commit
d2cdefa- Tree
fb92140- Author
Kenneth Reitz <me@kennethreitz.com>- Committer
Kenneth Reitz <me@kennethreitz.com>- Parent 1
952970f- Parent 2
720d0b2
8 files changed+42 added−20 removed
modified:requests/__init__.py+4 added-2 removed
1 # -*- coding: utf-8 -*-2 3-from . import packages4-from .core import *3+import packages4+from core import *5+6+from core import __version__modified:requests/core.py+5 added-5 removed
32 unmodified lines33 from .packages.poster.streaminghttp import register_openers34 35 36 __title__ = 'requests'37-__version__ = '0.2.3'38-__build__ = 0x00020337+__version__ = '0.2.4'38+__build__ = 0x00020439 __author__ = 'Kenneth Reitz'40 __license__ = 'ISC'41 __copyright__ = 'Copyright 2011 Kenneth Reitz'42 133 unmodified lines176 resp = opener(req)177 self._build_response(resp)178 self.response.ok = True179 180- except urllib2.HTTPError as why:180+ except urllib2.HTTPError, why:181 self._build_response(why)182 self.response.error = why183 184 23 unmodified lines208 209 self._build_response(resp)210 self.response.ok = True211 212- except urllib2.HTTPError as why:212+ except urllib2.HTTPError, why:213 self._build_response(why)214 self.response.error = why215 216 24 unmodified lines241 242 self._build_response(resp)243 self.response.ok = True244 245- except urllib2.HTTPError as why:245+ except urllib2.HTTPError, why:246 self._build_response(why)247 self.response.error = why248 249 self.sent = self.response.ok185 unmodified linesmodified:HISTORY.rst+8 added
1 History2 -------3 4+0.2.4 (2011-02-15)5+++++++++++++++++++6+7+* Python 2.5 Support8+* PyPy-c v1.4 Support9+* Auto-Authentication tests10+* Improved Request object constructor11+12 0.2.3 (2011-02-15)13 ++++++++++++++++++14 15 * New HTTPHandling Methods33 unmodified linesmodified:README.rst+4 added-2 removed
138 unmodified lines139 140 Roadmap141 -------142 143-- Sphinx Documentation144-- Exhaustive Unittests143+- Sphinx Documentation (http://code.kennethreitz.com/requests/)144+- Exhaustive unit tests145+- Get rid of Poster (gets really nasty in py3.x)146+- Python 3.x Support147 148 .. _`the repository`: http://github.com/kennethreitz/requests149 .. _AUTHORS: http://github.com/kennethreitz/requests/blob/master/AUTHORSmodified:setup.py+4 added-3 removed
1 unmodified line2 # -*- coding: utf-8 -*-3 4 import os5 import sys6+import requests7 8 from distutils.core import setup9 10 11 unmodified lines22 # if python > 2.6, require simplejson23 24 setup(25 name='requests',25- version='0.2.3',26+ version=requests.__version__,27 description='Awesome Python HTTP Library that\'s actually usable.',28 long_description=open('README.rst').read() + '\n\n' +29 open('HISTORY.rst').read(),30 author='Kenneth Reitz',6 unmodified lines37 ],38 install_requires=required,39 license='ISC',40 classifiers=(40- # 'Development Status :: 5 - Production/Stable',41+ 'Development Status :: 5 - Production/Stable',42 'Intended Audience :: Developers',43 'Natural Language :: English',44 'License :: OSI Approved :: ISC License (ISCL)',45 'Programming Language :: Python',45- # 'Programming Language :: Python :: 2.5',46+ 'Programming Language :: Python :: 2.5',47 'Programming Language :: Python :: 2.6',48 'Programming Language :: Python :: 2.7',49 # 'Programming Language :: Python :: 3.0',50 # 'Programming Language :: Python :: 3.1',2 unmodified linesmodified:test_requests.py+11 added-2 removed
1 #!/usr/bin/env python2 # -*- coding: utf-8 -*-3 4 import unittest5-from cStringIO import StringIO5 6 import requests7 8 38 unmodified lines47 48 self.assertEqual(r.status_code, 200)49 50 51+ requests.add_autoauth(url, auth)52+53+ r = requests.get(url)54+ self.assertEqual(r.status_code, 200)55+56+ # reset auto authentication57+ requests.AUTOAUTHS = []58+59+60+61 def test_POSTBIN_GET_POST_FILES(self):62 63 bin = requests.post('http://www.postbin.org/')64 self.assertEqual(bin.status_code, 200)65 66 post = requests.post(bin.url, data={'some': 'data'})67 self.assertEqual(post.status_code, 201)68 60- post2 = requests.post(bin.url, files={'some': StringIO('data')})69+ post2 = requests.post(bin.url, files={'some': open('test_requests.py')})70 self.assertEqual(post2.status_code, 201)71 72 73 def test_nonzero_evaluation(self):23 unmodified linesdeleted:test_suite.sh-4 removed
1234tox coverage xmlrm -fr pylint.txtpylint -d W0312 -d W0212 -d E1101 -d E0202 -d W0102 -d E0102 -f parseable ./requests > pylint.txt || truemodified:tox.ini+6 added-2 removed
1 [tox]2-envlist = py24,py25,py26,py272+envlist = py25,py26,py27,pypy3 4 [testenv]5 commands=py.test --junitxml=junit-{envname}.xml6 deps = 7- pytest7+ pytest8+9+[testenv:pypy]10+basepython=/usr/bin/pypy-c11+