Skip to content
Myr

move config around a bit

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 09b6aef · Browse files · 4 files+16 added−3 removed
This commit

State

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

Diff stats

4 files+16 added−3 removed

  • tests:+4 added−0 removed
  • other:+12 added−3 removed

4 files+16 added−3 removed

modified:requests/models.py+4 added-3 removed
63 unmodified lines
64 _poolmanager=None,65 verify=None,66 session=None):6768 #: Dictionary of configurations for this request.69 self.config = dict(config or [])7071 #: Float describes the timeout of the request.72 # (Use socket.setdefaulttimeout() as fallback)73 self.timeout = timeout74
39 unmodified lines
114115 #: CookieJar to attach to :class:`Request <Request>`.116 self.cookies = dict(cookies or [])117115 #: Dictionary of configurations for this request.116 self.config = dict(config or [])117118 #: True if Request has been sent.119 self.sent = False120121 #: Event-handling hooks.
197 unmodified lines
319320 if not path:321 path = '/'322323324 if is_py2:325 if isinstance(scheme, str):326 scheme = scheme.encode('utf-8')327 if isinstance(netloc, str):
470 unmodified lines
modified:tests/test_requests_ext.py+4 added
47 unmodified lines
48 utf8_string = (u'Smörgås').encode('utf-8')49 requests.post('http://www.google.com/', data=utf8_string)505152 def test_unicode_error(self):53 url = u'http://blip.fm/~1abvfu'54 requests.get(url)5556if __name__ == '__main__':57 unittest.main()58
added:.env+1 added
1workon r
added:test.py+7 added
1import requests23s = requests.session()4s.config['encode_urls'] = False56r = s.get('http://localhost:7077/get?me=\"')7print r.text