File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ################################################################################
2+ # HACK: Work around gh-148750 in 3.15
3+ # In short, encodings is now partially frozen, which means its submodules can
4+ # only be loaded if they are also frozen or if they are in their default
5+ # location relative to the executable. For embedded runtimes, this is not true,
6+ # so we need to patch the __path__ to point at our expected location.
7+ # This code is very fragile and should not be reused.
8+ import sys
9+ import encodings
10+ for p in sys .path :
11+ if p .endswith (".zip" ):
12+ encodings .__path__ [:] = [f"{ p } \\ encodings" ]
13+ break
14+ ################################################################################
15+
116from .exceptions import (
217 ArgumentError ,
318 AutomaticInstallDisabledError ,
You can’t perform that action at this time.
0 commit comments