Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'release/0.2.4'

  • Loading branch information...
commit d2cdefa7df40e8b9cb98e831dc70bcefa71467c5 2 parents 952970f + 720d0b2
Kenneth Reitz kennethreitz authored
8 HISTORY.rst
Source Rendered
... ... @@ -1,6 +1,14 @@
1 1 History
2 2 -------
3 3
  4 +0.2.4 (2011-02-15)
  5 +++++++++++++++++++
  6 +
  7 +* Python 2.5 Support
  8 +* PyPy-c v1.4 Support
  9 +* Auto-Authentication tests
  10 +* Improved Request object constructor
  11 +
4 12 0.2.3 (2011-02-15)
5 13 ++++++++++++++++++
6 14
6 README.rst
Source Rendered
@@ -140,8 +140,10 @@ If you'd like to contribute, simply fork `the repository`_, commit your changes
140 140 Roadmap
141 141 -------
142 142
143   -- Sphinx Documentation
144   -- Exhaustive Unittests
  143 +- Sphinx Documentation (http://code.kennethreitz.com/requests/)
  144 +- Exhaustive unit tests
  145 +- Get rid of Poster (gets really nasty in py3.x)
  146 +- Python 3.x Support
145 147
146 148 .. _`the repository`: http://github.com/kennethreitz/requests
147 149 .. _AUTHORS: http://github.com/kennethreitz/requests/blob/master/AUTHORS
6 requests/__init__.py
... ... @@ -1,4 +1,6 @@
1 1 # -*- coding: utf-8 -*-
2 2
3   -from . import packages
4   -from .core import *
  3 +import packages
  4 +from core import *
  5 +
  6 +from core import __version__
10 requests/core.py
@@ -34,8 +34,8 @@
34 34
35 35
36 36 __title__ = 'requests'
37   -__version__ = '0.2.3'
38   -__build__ = 0x000203
  37 +__version__ = '0.2.4'
  38 +__build__ = 0x000204
39 39 __author__ = 'Kenneth Reitz'
40 40 __license__ = 'ISC'
41 41 __copyright__ = 'Copyright 2011 Kenneth Reitz'
@@ -177,7 +177,7 @@ def send(self, anyway=False):
177 177 self._build_response(resp)
178 178 self.response.ok = True
179 179
180   - except urllib2.HTTPError as why:
  180 + except urllib2.HTTPError, why:
181 181 self._build_response(why)
182 182 self.response.error = why
183 183
@@ -209,7 +209,7 @@ def send(self, anyway=False):
209 209 self._build_response(resp)
210 210 self.response.ok = True
211 211
212   - except urllib2.HTTPError as why:
  212 + except urllib2.HTTPError, why:
213 213 self._build_response(why)
214 214 self.response.error = why
215 215
@@ -242,7 +242,7 @@ def send(self, anyway=False):
242 242 self._build_response(resp)
243 243 self.response.ok = True
244 244
245   - except urllib2.HTTPError as why:
  245 + except urllib2.HTTPError, why:
246 246 self._build_response(why)
247 247 self.response.error = why
248 248
7 setup.py
@@ -3,6 +3,7 @@
3 3
4 4 import os
5 5 import sys
  6 +import requests
6 7
7 8 from distutils.core import setup
8 9
@@ -22,7 +23,7 @@
22 23
23 24 setup(
24 25 name='requests',
25   - version='0.2.3',
  26 + version=requests.__version__,
26 27 description='Awesome Python HTTP Library that\'s actually usable.',
27 28 long_description=open('README.rst').read() + '\n\n' +
28 29 open('HISTORY.rst').read(),
@@ -37,12 +38,12 @@
37 38 install_requires=required,
38 39 license='ISC',
39 40 classifiers=(
40   - # 'Development Status :: 5 - Production/Stable',
  41 + 'Development Status :: 5 - Production/Stable',
41 42 'Intended Audience :: Developers',
42 43 'Natural Language :: English',
43 44 'License :: OSI Approved :: ISC License (ISCL)',
44 45 'Programming Language :: Python',
45   - # 'Programming Language :: Python :: 2.5',
  46 + 'Programming Language :: Python :: 2.5',
46 47 'Programming Language :: Python :: 2.6',
47 48 'Programming Language :: Python :: 2.7',
48 49 # 'Programming Language :: Python :: 3.0',
13 test_requests.py
@@ -2,7 +2,6 @@
2 2 # -*- coding: utf-8 -*-
3 3
4 4 import unittest
5   -from cStringIO import StringIO
6 5
7 6 import requests
8 7
@@ -49,6 +48,16 @@ def test_AUTH_HTTPS_200_OK_GET(self):
49 48 self.assertEqual(r.status_code, 200)
50 49
51 50
  51 + requests.add_autoauth(url, auth)
  52 +
  53 + r = requests.get(url)
  54 + self.assertEqual(r.status_code, 200)
  55 +
  56 + # reset auto authentication
  57 + requests.AUTOAUTHS = []
  58 +
  59 +
  60 +
52 61 def test_POSTBIN_GET_POST_FILES(self):
53 62
54 63 bin = requests.post('http://www.postbin.org/')
@@ -57,7 +66,7 @@ def test_POSTBIN_GET_POST_FILES(self):
57 66 post = requests.post(bin.url, data={'some': 'data'})
58 67 self.assertEqual(post.status_code, 201)
59 68
60   - post2 = requests.post(bin.url, files={'some': StringIO('data')})
  69 + post2 = requests.post(bin.url, files={'some': open('test_requests.py')})
61 70 self.assertEqual(post2.status_code, 201)
62 71
63 72
4 test_suite.sh
... ... @@ -1,4 +0,0 @@
1   -tox
2   -coverage xml
3   -rm -fr pylint.txt
4   -pylint -d W0312 -d W0212 -d E1101 -d E0202 -d W0102 -d E0102 -f parseable ./requests > pylint.txt || true
8 tox.ini
... ... @@ -1,7 +1,11 @@
1 1 [tox]
2   -envlist = py24,py25,py26,py27
  2 +envlist = py25,py26,py27,pypy
3 3
4 4 [testenv]
5 5 commands=py.test --junitxml=junit-{envname}.xml
6 6 deps =
7   - pytest
  7 + pytest
  8 +
  9 +[testenv:pypy]
  10 +basepython=/usr/bin/pypy-c
  11 +

0 comments on commit d2cdefa

Please sign in to comment.
Something went wrong with that request. Please try again.