Skip to content
Myr

Accept objects with string representations as URLs.

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

authored by Cory Benfield · committed by Cory Benfield · parent e624ae8 · Browse files · 1 file+8 added−1 removed
This commit

State

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

Diff stats

1 file+8 added−1 removed

  • other:+8 added−1 removed

1 file+8 added−1 removed

modified:requests/models.py+8 added-1 removed
69 unmodified lines
70 # (Use socket.setdefaulttimeout() as fallback)71 self.timeout = timeout7273 #: Request URL.74 #: Accept objects that have string representations.75 try:76 self.url = unicode(url)77 except NameError:78 # We're on Python 3.79 self.url = str(url)80 except UnicodeDecodeError:74 self.url = url81 self.url = url8283 #: Dictionary of HTTP Headers to attach to the :class:`Request <Request>`.84 self.headers = dict(headers or [])85
773 unmodified lines