compat.py — requests Source File
Architecture documentation for compat.py, a python file in the requests codebase. 4 imports, 2 dependents.
Entity Profile
Dependency Diagram
graph LR e5a6a063_2dfc_096a_27c7_bb536a14c8e5["compat.py"] 009aac51_ed5c_c3ea_588d_73c6c4638941["warnings"] e5a6a063_2dfc_096a_27c7_bb536a14c8e5 --> 009aac51_ed5c_c3ea_588d_73c6c4638941 c982fdaf_f677_8a6c_cba3_d08b101e9f21["StringIO"] e5a6a063_2dfc_096a_27c7_bb536a14c8e5 --> c982fdaf_f677_8a6c_cba3_d08b101e9f21 b1946df2_c2d7_8311_fc51_9844255a3d78["io"] e5a6a063_2dfc_096a_27c7_bb536a14c8e5 --> b1946df2_c2d7_8311_fc51_9844255a3d78 b56b7c73_c123_c35f_3239_e7b239f512e5["cStringIO"] e5a6a063_2dfc_096a_27c7_bb536a14c8e5 --> b56b7c73_c123_c35f_3239_e7b239f512e5 69ebfd6f_8f0c_4586_0c19_2c348e1a42a2["test_requests.py"] 69ebfd6f_8f0c_4586_0c19_2c348e1a42a2 --> e5a6a063_2dfc_096a_27c7_bb536a14c8e5 5828793e_be5b_8952_37f1_338fd4634a1a["test_utils.py"] 5828793e_be5b_8952_37f1_338fd4634a1a --> e5a6a063_2dfc_096a_27c7_bb536a14c8e5 style e5a6a063_2dfc_096a_27c7_bb536a14c8e5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import warnings
try:
import StringIO
except ImportError:
import io as StringIO
try:
from cStringIO import StringIO as cStringIO
except ImportError:
cStringIO = None
def u(s):
warnings.warn(
(
"This helper function is no longer relevant in Python 3. "
"Usage of this alias should be discontinued as it will be "
"removed in a future release of Requests."
),
DeprecationWarning,
)
return s
Domain
Subdomains
Functions
Dependencies
- StringIO
- cStringIO
- io
- warnings
Imported By
Source
Frequently Asked Questions
What does compat.py do?
compat.py is a source file in the requests codebase, written in python. It belongs to the CoreAPI domain, SessionLifecycle subdomain.
What functions are defined in compat.py?
compat.py defines 4 function(s): StringIO, cStringIO, io, u.
What does compat.py depend on?
compat.py imports 4 module(s): StringIO, cStringIO, io, warnings.
What files import compat.py?
compat.py is imported by 2 file(s): test_requests.py, test_utils.py.
Where is compat.py in the architecture?
compat.py is located at tests/compat.py (domain: CoreAPI, subdomain: SessionLifecycle, directory: tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free