aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-09-06 19:42:27 -0700
committerSteve Dower <steve.dower@microsoft.com>2016-09-06 19:42:27 -0700
commitf5aba58480bb0dd45181f609487ac2ecfcc98673 (patch)
tree0d70301224f945e379c37058fa6b24b6ba8c78e5 /Lib/site.py
parentAdds test.support.PGO and skips tests that are not useful for PGO. (diff)
downloadcpython-f5aba58480bb0dd45181f609487ac2ecfcc98673.tar.gz
cpython-f5aba58480bb0dd45181f609487ac2ecfcc98673.tar.bz2
cpython-f5aba58480bb0dd45181f609487ac2ecfcc98673.zip
Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec lookup
Diffstat (limited to 'Lib/site.py')
-rw-r--r--Lib/site.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/Lib/site.py b/Lib/site.py
index a84e3bb7c57..a536ef17cae 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -423,21 +423,6 @@ def enablerlcompleter():
sys.__interactivehook__ = register_readline
-def aliasmbcs():
- """On Windows, some default encodings are not provided by Python,
- while they are always available as "mbcs" in each locale. Make
- them usable by aliasing to "mbcs" in such a case."""
- if sys.platform == 'win32':
- import _bootlocale, codecs
- enc = _bootlocale.getpreferredencoding(False)
- if enc.startswith('cp'): # "cp***" ?
- try:
- codecs.lookup(enc)
- except LookupError:
- import encodings
- encodings._cache[enc] = encodings._unknown
- encodings.aliases.aliases[enc] = 'mbcs'
-
CONFIG_LINE = r'^(?P<key>(\w|[-_])+)\s*=\s*(?P<value>.*)\s*$'
def venv(known_paths):
@@ -560,7 +545,6 @@ def main():
setcopyright()
sethelper()
enablerlcompleter()
- aliasmbcs()
execsitecustomize()
if ENABLE_USER_SITE:
execusercustomize()