mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Improve Python tree-shaking
This commit is contained in:
parent
5bb2275788
commit
4f41f2184d
169 changed files with 4182 additions and 2411 deletions
13
third_party/python/Lib/encodings/__init__.py
vendored
13
third_party/python/Lib/encodings/__init__.py
vendored
|
@ -154,16 +154,3 @@ def search_function(encoding):
|
|||
|
||||
# Register the search_function in the Python codec registry
|
||||
codecs.register(search_function)
|
||||
|
||||
if sys.platform == 'win32':
|
||||
def _alias_mbcs(encoding):
|
||||
try:
|
||||
import _bootlocale
|
||||
if encoding == _bootlocale.getpreferredencoding(False):
|
||||
import encodings.mbcs
|
||||
return encodings.mbcs.getregentry()
|
||||
except ImportError:
|
||||
# Imports may fail while we are shutting down
|
||||
pass
|
||||
|
||||
codecs.register(_alias_mbcs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue