[pypy-commit] pypy py3k: kill __pypy__.get_console_cp, use py3's os.device_encoding instead

pjenvey noreply at buildbot.pypy.org
Fri May 10 03:15:41 CEST 2013


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r63955:ed8e8ff8f729
Date: 2013-05-09 18:14 -0700
http://bitbucket.org/pypy/pypy/changeset/ed8e8ff8f729/

Log:	kill __pypy__.get_console_cp, use py3's os.device_encoding instead

diff --git a/pypy/module/__pypy__/__init__.py b/pypy/module/__pypy__/__init__.py
--- a/pypy/module/__pypy__/__init__.py
+++ b/pypy/module/__pypy__/__init__.py
@@ -59,8 +59,6 @@
         'newdict'                   : 'interp_dict.newdict',
         'dictstrategy'              : 'interp_dict.dictstrategy',
     }
-    if sys.platform == 'win32':
-        interpleveldefs['get_console_cp'] = 'interp_magic.get_console_cp'
 
     submodules = {
         "builders": BuildersModule,
diff --git a/pypy/module/__pypy__/interp_magic.py b/pypy/module/__pypy__/interp_magic.py
--- a/pypy/module/__pypy__/interp_magic.py
+++ b/pypy/module/__pypy__/interp_magic.py
@@ -88,13 +88,6 @@
     except OSError, e:
         raise wrap_oserror(space, e)
 
-def get_console_cp(space):
-    from rpython.rlib import rwin32    # Windows only
-    return space.newtuple([
-        space.wrap('cp%d' % rwin32.GetConsoleCP()),
-        space.wrap('cp%d' % rwin32.GetConsoleOutputCP()),
-        ])
-
 @unwrap_spec(sizehint=int)
 def resizelist_hint(space, w_iterable, sizehint):
     if not isinstance(w_iterable, W_ListObject):


More information about the pypy-commit mailing list