Skip to content
Myr

merge changes

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 · parent 1f60e10 · Browse files · 2 files+24 added−11 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+24 added−11 removed

  • other:+24 added−11 removed

2 files+24 added−11 removed

modified:requests/async.py+10 added-8 removed
8 unmodified lines
9 :copyright: (c) 2011 by Kenneth Reitz.10 :license: ISC, see LICENSE for more details.11"""121314from __future__ import absolute_import15import urllib16import urllib217from urllib2 import HTTPError181920try:21 import eventlet22 eventlet.monkey_patch()23except ImportError:
5 unmodified lines
29 monkey.patch_all()30 except ImportError:31 pass323334if not 'eventlet' in locals():35 raise ImportError('No Async adaptations of urllib2 found!')363738from .core import *3936__all__ = ['Request', 'Response', 'request', 'get', 'head', 'post', 'put', 'delete', 'auth_manager', 'AuthObject',37 'RequestException', 'AuthenticationError', 'URLRequired', 'InvalidMethod', 'HTTPError']38__title__ = 'requests'39__version__ = '0.0.1'40__build__ = 0x00000141__author__ = 'Dj Gilcrease'42__license__ = 'ISC'43__copyright__ = 'Copyright 2011 Kenneth Reitz'4041__all__ = [42 'Request', 'Response', 'request', 'get', 'head', 'post', 'put', 'delete', 43 'auth_manager', 'AuthObject','RequestException', 'AuthenticationError', 44 'URLRequired', 'InvalidMethod', 'HTTPError'45]
modified:requests/core.py+14 added-3 removed
16 unmodified lines
1718from .packages.poster.encode import multipart_encode19from .packages.poster.streaminghttp import register_openers2021__all__ = ['Request', 'Response', 'request', 'get', 'head', 'post', 'put', 'delete', 'auth_manager', 'AuthObject',22 'RequestException', 'AuthenticationError', 'URLRequired', 'InvalidMethod', 'HTTPError']2122__title__ = 'requests'23__version__ = '0.2.5'24__build__ = 0x00020526__author__ = 'Kenneth Reitz, Dj Gilcrease'25__author__ = 'Kenneth Reitz'26__license__ = 'ISC'27__copyright__ = 'Copyright 2011 Kenneth Reitz'2829__all__ = [30 'Request', 'Response', 'request', 'get', 'head', 'post', 'put', 'delete', 31 'auth_manager', 'AuthObject','RequestException', 'AuthenticationError', 32 'URLRequired', 'InvalidMethod', 'HTTPError'33]343536class _Request(urllib2.Request):37 """Hidden wrapper around the urllib2.Request object. Allows for manual38 setting of HTTP methods.39 """
164 unmodified lines
204 """Raises stored HTTPError if one exists."""205 if self.error:206 raise self.error207208209210class AuthManager(object):211 def __new__(cls):212 singleton = cls.__dict__.get('__singleton__')213 if singleton is not None:
147 unmodified lines
361 r.send()362363 return r.response364365366def get(url, params={}, headers={}, cookies=None, auth=None):367 """Sends a GET request. Returns :class:`Response` object.368369 :param url: URL for the new :class:`Request` object.
58 unmodified lines
428 """429430 return request('DELETE', url, params=params, headers=headers, cookiejar=cookies, auth=auth)431432433434class RequestException(Exception):435 """There was an ambiguous exception that occured while handling your436 request."""437
8 unmodified lines