Skip to content
Myr

every chardet package maps to requests.packages.chardet.* package respectively

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

authored by mayank · committed by mayank · parent 839a8ed · 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:src/requests/packages.py+2 added-3 removed
21 unmodified lines
2223target = chardet.__name__24for mod in list(sys.modules):25 if mod == target or mod.startswith(f"{target}."):26 target = target.replace(target, "chardet")27 sys.modules[f"requests.packages.{target}"] = sys.modules[mod]28# Kinda cool, though, right?26 sys.modules[f"requests.packages.{mod}"] = sys.modules[mod]27# Kinda cool, though, right?