Buckets:
MisterAI/LocalAI_Demo_backends / cpu-diffusers.upgrade-tmp /venv /lib /python3.10 /site-packages /requests /packages.py
| import sys | |
| try: | |
| import chardet | |
| except ImportError: | |
| import warnings | |
| import charset_normalizer as chardet | |
| warnings.filterwarnings("ignore", "Trying to detect", module="charset_normalizer") | |
| # This code exists for backwards compatibility reasons. | |
| # I don't like it either. Just look the other way. :) | |
| for package in ("urllib3", "idna"): | |
| locals()[package] = __import__(package) | |
| # This traversal is apparently necessary such that the identities are | |
| # preserved (requests.packages.urllib3.* is urllib3.*) | |
| for mod in list(sys.modules): | |
| if mod == package or mod.startswith(f"{package}."): | |
| sys.modules[f"requests.packages.{mod}"] = sys.modules[mod] | |
| target = chardet.__name__ | |
| for mod in list(sys.modules): | |
| if mod == target or mod.startswith(f"{target}."): | |
| target = target.replace(target, "chardet") | |
| sys.modules[f"requests.packages.{target}"] = sys.modules[mod] | |
| # Kinda cool, though, right? | |
Xet Storage Details
- Size:
- 957 Bytes
- Xet hash:
- e23a7f0b9a86422b49570ad5e71c50e25485377c1042d6de7f1b00c30b40cd4f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.