compat.py
This file
Path
tests/compat.py
23 lines · 480 bytes · Python
Last changed by
Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290
History of this fileTake it
The walk stopped after 200 commits: lines older than 1f7c888 point at it.
Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583
line 1why, one step back1import warningsMerge pull request #5570 from ajorg-aws/masterNate Prewittbefore adoption1f7c888
lines 2–12why, one step back23try:4 import StringIO5except ImportError:6 import io as StringIO78try:9 from cStringIO import StringIO as cStringIO10except ImportError:11 cStringIO = None12Farewell, sweet Concorde!Nate Prewittbefore adoption8bce583
lines 13–23why, one step back1314def u(s):15 warnings.warn(16 (17 "This helper function is no longer relevant in Python 3. "18 "Usage of this alias should be discontinued as it will be "19 "removed in a future release of Requests."20 ),21 DeprecationWarning,22 )23 return s