added:requests/async.py+43 added
1+# -*- coding: utf-8 -*-2+3+"""4+ requests.core5+ ~~~~~~~~~~~~~6+7+ This module implements the main Requests system.8+9+ :copyright: (c) 2011 by Kenneth Reitz.10+ :license: ISC, see LICENSE for more details.11+"""12+13+from __future__ import absolute_import14+import urllib15+import urllib216+from urllib2 import HTTPError17+18+try:19+ import eventlet20+ eventlet.monkey_patch()21+except ImportError:22+ pass23+24+if not 'eventlet' in locals():25+ try:26+ from gevent import monkey27+ monkey.patch_all()28+ except ImportError:29+ pass30+31+if not 'eventlet' in locals():32+ raise ImportError('No Async adaptations of urllib2 found!')33+34+from .core import *35+36+__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'