Skip to content
Myr

added handling for chardet and charset_normalizer imports

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

authored by mayank · committed by mayank · parent ad761ab · Browse files · 1 file+2 added−0 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−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:src/requests/packages.py+2 added
22 unmodified lines
23target = chardet.__name__24for mod in list(sys.modules):25 if mod == target or mod.startswith(f"{target}."):26 sys.modules[f"requests.packages.{mod}"] = sys.modules[mod]27 target = target.replace(target, "chardet")28 sys.modules[f"requests.packages.{target}"] = sys.modules[mod]29# Kinda cool, though, right?