Skip to content
Myr

Added an async module to make it explicit to the user that they are using async calls.

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

authored by digitalxero · committed by digitalxero · parent d1c8933 · Browse files · 2 files+45 added−2 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+45 added−2 removed

  • other:+45 added−2 removed

2 files+45 added−2 removed

added:requests/async.py+43 added
1# -*- coding: utf-8 -*-23"""4 requests.core5 ~~~~~~~~~~~~~67 This module implements the main Requests system.89 :copyright: (c) 2011 by Kenneth Reitz.10 :license: ISC, see LICENSE for more details.11"""1213from __future__ import absolute_import14import urllib15import urllib216from urllib2 import HTTPError1718try:19 import eventlet20 eventlet.monkey_patch()21except ImportError:22 pass2324if not 'eventlet' in locals():25 try:26 from gevent import monkey27 monkey.patch_all()28 except ImportError:29 pass3031if not 'eventlet' in locals():32 raise ImportError('No Async adaptations of urllib2 found!')3334from .core import *3536__all__ = ['Request', 'Response', 'request', 'get', 'head', 'post', 'put', 'delete', 'add_autoauth', 'AUTOAUTHS',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 Dj Gilcrease'
modified:requests/core.py+2 added-2 removed
19 unmodified lines
2021__all__ = ['Request', 'Response', 'request', 'get', 'head', 'post', 'put', 'delete', 'add_autoauth', 'AUTOAUTHS',22 'RequestException', 'AuthenticationError', 'URLRequired', 'InvalidMethod', 'HTTPError']23__title__ = 'requests'24__version__ = '0.2.4'25__build__ = 0x00020424__version__ = '0.2.5'25__build__ = 0x00020526__author__ = 'Kenneth Reitz'27__license__ = 'ISC'28__copyright__ = 'Copyright 2011 Kenneth Reitz'29
317 unmodified lines