[pypy-commit] pypy py3k: _winreg -> winreg
pjenvey
noreply at buildbot.pypy.org
Mon Jun 2 02:05:17 CEST 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r71798:28d0b1ba4a91
Date: 2014-05-31 11:11 -0700
http://bitbucket.org/pypy/pypy/changeset/28d0b1ba4a91/
Log: _winreg -> winreg
diff --git a/pypy/module/_codecs/test/test_codecs.py b/pypy/module/_codecs/test/test_codecs.py
--- a/pypy/module/_codecs/test/test_codecs.py
+++ b/pypy/module/_codecs/test/test_codecs.py
@@ -760,10 +760,10 @@
toencode = u'caf\xe9', b'caf\xe9'
try:
# test for non-latin1 codepage, more general test needed
- import _winreg
- key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
+ import winreg
+ key = winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,
r'System\CurrentControlSet\Control\Nls\CodePage')
- if _winreg.QueryValueEx(key, 'ACP')[0] == u'1255': # non-latin1
+ if winreg.QueryValueEx(key, 'ACP')[0] == u'1255': # non-latin1
toencode = u'caf\xbf',b'caf\xbf'
except:
assert False, 'cannot test mbcs on this windows system, check code page'
diff --git a/pypy/module/_winreg/interp_winreg.py b/pypy/module/_winreg/interp_winreg.py
--- a/pypy/module/_winreg/interp_winreg.py
+++ b/pypy/module/_winreg/interp_winreg.py
@@ -68,7 +68,7 @@
descr_HKEY_new = interp2app(new_HKEY)
W_HKEY.typedef = TypeDef(
- "_winreg.HKEYType",
+ "winreg.HKEYType",
__doc__ = """\
PyHKEY Object - A Python object, representing a win32 registry key.
@@ -212,7 +212,7 @@
The key identified by the key parameter must have been opened with
KEY_SET_VALUE access."""
if typ != rwinreg.REG_SZ:
- errstring = space.wrap("Type must be _winreg.REG_SZ")
+ errstring = space.wrap("Type must be winreg.REG_SZ")
raise OperationError(space.w_ValueError, errstring)
hkey = hkey_w(w_hkey, space)
if space.is_w(w_subkey, space.w_None):
diff --git a/pypy/module/_winreg/test/test_winreg.py b/pypy/module/_winreg/test/test_winreg.py
--- a/pypy/module/_winreg/test/test_winreg.py
+++ b/pypy/module/_winreg/test/test_winreg.py
@@ -3,7 +3,7 @@
import os, sys, py
if sys.platform != 'win32':
- py.test.skip("_winreg is a win32 module")
+ py.test.skip("winreg is a win32 module")
try:
# To call SaveKey, the process must have Backup Privileges
More information about the pypy-commit
mailing list