Skip to content
Myr

Backing out stupidly incorrect str vs unicode check

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

It's simply wrong. Since compat.py sets str = unicode for py2, the original logic is sound.

authored by Idan Gazit · committed by Donald Stufft · parent 906fcd7 · Browse files · 1 file+2 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

1 file+2 added−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:requests/models.py+2 added-3 removed
6 unmodified lines
7This module contains the primary objects that power Requests.8"""910import os11import types11from datetime import datetime1213from .hooks import dispatch_hook, HOOKS14from .structures import CaseInsensitiveDict
320 unmodified lines
335 result = []336 for k, vs in params:337 for v in isinstance(vs, list) and vs or [vs]:338 result.append(340 (k.encode('utf-8') if isinstance(k, types.StringType) else k,341 v.encode('utf-8') if isinstance(v, types.StringType) else v))339 (k.encode('utf-8') if isinstance(k, str) else k,340 v.encode('utf-8') if isinstance(v, str) else v))341 return result, urlencode(result, doseq=True)342 else:343 return data, data344
506 unmodified lines