Skip to content
Myr

Remove unicode encoding for HTTP method.

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

authored by Eric Scrivner · committed by Eric Scrivner · parent 916e6fc · Browse files · 1 file+4 added−8 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+4 added−8 removed

  • other:+4 added−8 removed

1 file+4 added−8 removed

modified:requests/models.py+4 added-8 removed
26 unmodified lines
27 to_key_val_list, DEFAULT_CA_BUNDLE_PATH, parse_header_links, iter_slices,28 guess_json_utf)29from .compat import (30 cookielib, urlparse, urlunparse, urljoin, urlsplit, urlencode, str, bytes,31 StringIO, is_py2, chardet, json, builtin_str, urldefrag, basestring)31 StringIO, is_py2, is_py3, chardet, json, builtin_str, urldefrag, basestring)3233REDIRECT_STATI = (codes.moved, codes.found, codes.other, codes.temporary_moved)34CONTENT_CHUNK_SIZE = 10 * 102435ITER_CHUNK_SIZE = 10 * 1024
185 unmodified lines
221 return '<PreparedRequest [%s]>' % (self.method)222223 def prepare_method(self, method):224 """Prepares the given HTTP method."""225 try:226 method = unicode(method)227 except NameError:228 # We're on Python 3.229 method = str(method)225 self.method = method226 if self.method is not None:227 self.method = self.method.upper()228231 self.method = method.upper()232229 def prepare_url(self, url, params):230 """Prepares the given HTTP URL."""231 #: Accept objects that have string representations.232 try:
343 unmodified lines