Skip to content
Myr

Merge pull request #2845 from gagoman/fix-2844

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

Fix issue #2844

authored by Cory Benfield · committed by Cory Benfield · parents 13ea739, edc68a0 · Browse files · 2 files+6 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

2 files+6 added−1 removed

  • other:+6 added−1 removed

2 files+6 added−1 removed

modified:requests/models.py+1 added-1 removed
79 unmodified lines
80 if parameters are supplied as a dict.81 """8283 if isinstance(data, (str, bytes)):84 return data84 return to_native_string(data)85 elif hasattr(data, 'read'):86 return data87 elif hasattr(data, '__iter__'):88 result = []
760 unmodified lines
modified:test_requests.py+5 added
137 unmodified lines
138 request = requests.Request('GET', 'http://example.com/', params=param_ordered_dict)139 prep = session.prepare_request(request)140 assert prep.url == 'http://example.com/?z=1&a=1&k=1&d=1'141142 def test_params_bytes_are_encoded(self):143 request = requests.Request('GET', 'http://example.com',144 params=b'test=foo').prepare()145 assert request.url == 'http://example.com/?test=foo'146147 def test_mixed_case_scheme_acceptable(self):148 s = requests.Session()149 s.proxies = getproxies()150 parts = urlparse(httpbin('get'))
1580 unmodified lines