Skip to content
Myr

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

8 files+42 added−20 removed

modified:requests/__init__.py+4 added-2 removed
1# -*- coding: utf-8 -*-23from . import packages4from .core import *3import packages4from core import *56from core import __version__
modified:requests/core.py+5 added-5 removed
32 unmodified lines
33from .packages.poster.streaminghttp import register_openers343536__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 lines
176 resp = opener(req)177 self._build_response(resp)178 self.response.ok = True179180 except urllib2.HTTPError as why:180 except urllib2.HTTPError, why:181 self._build_response(why)182 self.response.error = why183184
23 unmodified lines
208209 self._build_response(resp)210 self.response.ok = True211212 except urllib2.HTTPError as why:212 except urllib2.HTTPError, why:213 self._build_response(why)214 self.response.error = why215216
24 unmodified lines
241242 self._build_response(resp)243 self.response.ok = True244245 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.ok
185 unmodified lines
modified:HISTORY.rst+8 added
1History2-------340.2.4 (2011-02-15)5++++++++++++++++++67* Python 2.5 Support8* PyPy-c v1.4 Support9* Auto-Authentication tests10* Improved Request object constructor11120.2.3 (2011-02-15)13++++++++++++++++++1415* New HTTPHandling Methods
33 unmodified lines
modified:README.rst+4 added-2 removed
138 unmodified lines
139140Roadmap141-------142143- 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 Support147148.. _`the repository`: http://github.com/kennethreitz/requests149.. _AUTHORS: http://github.com/kennethreitz/requests/blob/master/AUTHORS
modified:setup.py+4 added-3 removed
1 unmodified line
2# -*- coding: utf-8 -*-34import os5import sys6import requests78from distutils.core import setup910
11 unmodified lines
22# if python > 2.6, require simplejson2324setup(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 lines
37 ],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 lines
modified:test_requests.py+11 added-2 removed
1#!/usr/bin/env python2# -*- coding: utf-8 -*-34import unittest5from cStringIO import StringIO56import requests78
38 unmodified lines
4748 self.assertEqual(r.status_code, 200)495051 requests.add_autoauth(url, auth)5253 r = requests.get(url)54 self.assertEqual(r.status_code, 200)5556 # reset auto authentication57 requests.AUTOAUTHS = []58596061 def test_POSTBIN_GET_POST_FILES(self):6263 bin = requests.post('http://www.postbin.org/')64 self.assertEqual(bin.status_code, 200)6566 post = requests.post(bin.url, data={'some': 'data'})67 self.assertEqual(post.status_code, 201)6860 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)717273 def test_nonzero_evaluation(self):
23 unmodified lines
deleted:test_suite.sh-4 removed
modified:tox.ini+6 added-2 removed
1[tox]2envlist = py24,py25,py26,py272envlist = py25,py26,py27,pypy34[testenv]5commands=py.test --junitxml=junit-{envname}.xml6deps = 7 pytest7 pytest89[testenv:pypy]10basepython=/usr/bin/pypy-c11