Skip to content

Commit

Permalink
Merge branch 'release/0.2.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Reitz committed Feb 19, 2011
2 parents 952970f + 720d0b2 commit d2cdefa
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 20 deletions.
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
History
-------

0.2.4 (2011-02-15)
++++++++++++++++++

* Python 2.5 Support
* PyPy-c v1.4 Support
* Auto-Authentication tests
* Improved Request object constructor

0.2.3 (2011-02-15)
++++++++++++++++++

Expand Down
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@ If you'd like to contribute, simply fork `the repository`_, commit your changes
Roadmap
-------

- Sphinx Documentation
- Exhaustive Unittests
- Sphinx Documentation (http://code.kennethreitz.com/requests/)
- Exhaustive unit tests
- Get rid of Poster (gets really nasty in py3.x)
- Python 3.x Support

.. _`the repository`: http://github.com/kennethreitz/requests
.. _AUTHORS: http://github.com/kennethreitz/requests/blob/master/AUTHORS
6 changes: 4 additions & 2 deletions requests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-

from . import packages
from .core import *
import packages
from core import *

from core import __version__
10 changes: 5 additions & 5 deletions requests/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@


__title__ = 'requests'
__version__ = '0.2.3'
__build__ = 0x000203
__version__ = '0.2.4'
__build__ = 0x000204
__author__ = 'Kenneth Reitz'
__license__ = 'ISC'
__copyright__ = 'Copyright 2011 Kenneth Reitz'
Expand Down Expand Up @@ -177,7 +177,7 @@ def send(self, anyway=False):
self._build_response(resp)
self.response.ok = True

except urllib2.HTTPError as why:
except urllib2.HTTPError, why:
self._build_response(why)
self.response.error = why

Expand Down Expand Up @@ -209,7 +209,7 @@ def send(self, anyway=False):
self._build_response(resp)
self.response.ok = True

except urllib2.HTTPError as why:
except urllib2.HTTPError, why:
self._build_response(why)
self.response.error = why

Expand Down Expand Up @@ -242,7 +242,7 @@ def send(self, anyway=False):
self._build_response(resp)
self.response.ok = True

except urllib2.HTTPError as why:
except urllib2.HTTPError, why:
self._build_response(why)
self.response.error = why

Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import sys
import requests

from distutils.core import setup

Expand All @@ -22,7 +23,7 @@

setup(
name='requests',
version='0.2.3',
version=requests.__version__,
description='Awesome Python HTTP Library that\'s actually usable.',
long_description=open('README.rst').read() + '\n\n' +
open('HISTORY.rst').read(),
Expand All @@ -37,12 +38,12 @@
install_requires=required,
license='ISC',
classifiers=(
# 'Development Status :: 5 - Production/Stable',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: ISC License (ISCL)',
'Programming Language :: Python',
# 'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 3.0',
Expand Down
13 changes: 11 additions & 2 deletions test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# -*- coding: utf-8 -*-

import unittest
from cStringIO import StringIO

import requests

Expand Down Expand Up @@ -49,6 +48,16 @@ def test_AUTH_HTTPS_200_OK_GET(self):
self.assertEqual(r.status_code, 200)


requests.add_autoauth(url, auth)

r = requests.get(url)
self.assertEqual(r.status_code, 200)

# reset auto authentication
requests.AUTOAUTHS = []



def test_POSTBIN_GET_POST_FILES(self):

bin = requests.post('http://www.postbin.org/')
Expand All @@ -57,7 +66,7 @@ def test_POSTBIN_GET_POST_FILES(self):
post = requests.post(bin.url, data={'some': 'data'})
self.assertEqual(post.status_code, 201)

post2 = requests.post(bin.url, files={'some': StringIO('data')})
post2 = requests.post(bin.url, files={'some': open('test_requests.py')})
self.assertEqual(post2.status_code, 201)


Expand Down
4 changes: 0 additions & 4 deletions test_suite.sh

This file was deleted.

8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[tox]
envlist = py24,py25,py26,py27
envlist = py25,py26,py27,pypy

[testenv]
commands=py.test --junitxml=junit-{envname}.xml
deps =
pytest
pytest

[testenv:pypy]
basepython=/usr/bin/pypy-c

0 comments on commit d2cdefa

Please sign in to comment.