hmmm
authorKenneth Reitz <me@kennethreitz.com>
Mon, 17 Dec 2012 08:51:23 +0000 (03:51 -0500)
committerKenneth Reitz <me@kennethreitz.com>
Mon, 17 Dec 2012 08:51:23 +0000 (03:51 -0500)
requests/hooks.py
requests/models.py

index 9a35fb1..6a50410 100644 (file)
@@ -8,9 +8,6 @@ This module provides the capabilities for the Requests hooks system.
 
 Available hooks:
 
-``args``:
-    A dictionary of the arguments being sent to Request().
-
 ``pre_request``:
     The Request object, directly after being created.
 
@@ -26,8 +23,8 @@ Available hooks:
 """
 
 
-HOOKS = ('args', 'pre_request', 'pre_send', 'post_request', 'response')
-
+HOOKS = ('pre_prepare', 'post_prepare', 'pre_request', 'pre_send', 'post_request', 'response')
+# TODO: response is the only one
 
 def dispatch_hook(key, hooks, hook_data):
     """Dispatches a hook dictionary on a given piece of data."""
index e7c6a16..316dc40 100644 (file)
@@ -7,12 +7,12 @@ requests.models
 This module contains the primary objects that power Requests.
 """
 
-import os
-import socket
-import collections
+import os
+import socket
+import collections
 import logging
 
-from datetime import datetime
+from datetime import datetime
 from io import BytesIO
 
 from .hooks import dispatch_hook, HOOKS
@@ -21,11 +21,11 @@ from .status_codes import codes
 
 from .auth import HTTPBasicAuth, HTTPProxyAuth
 from .cookies import cookiejar_from_dict, extract_cookies_to_jar, get_cookie_header
-from .packages.urllib3.exceptions import MaxRetryError, LocationParseError
-from .packages.urllib3.exceptions import TimeoutError
-from .packages.urllib3.exceptions import SSLError as _SSLError
-from .packages.urllib3.exceptions import HTTPError as _HTTPError
-from .packages.urllib3 import connectionpool, poolmanager
+from .packages.urllib3.exceptions import MaxRetryError, LocationParseError
+from .packages.urllib3.exceptions import TimeoutError
+from .packages.urllib3.exceptions import SSLError as _SSLError
+from .packages.urllib3.exceptions import HTTPError as _HTTPError
+from .packages.urllib3 import connectionpool, poolmanager
 from .packages.urllib3.filepost import encode_multipart_formdata
 
 from .exceptions import (