[pypy-svn] r77858 - in pypy/branch/fast-forward: lib_pypy pypy/config pypy/doc/config pypy/module/_md5 pypy/module/_md5/test pypy/module/_sha pypy/module/_sha/test pypy/module/md5 pypy/module/sha

afa at codespeak.net afa at codespeak.net
Wed Oct 13 11:46:26 CEST 2010


Author: afa
Date: Wed Oct 13 11:46:24 2010
New Revision: 77858

Added:
   pypy/branch/fast-forward/lib_pypy/_md5.py
      - copied unchanged from r77812, pypy/branch/fast-forward/lib_pypy/md5.py
   pypy/branch/fast-forward/lib_pypy/_sha.py
      - copied unchanged from r77812, pypy/branch/fast-forward/lib_pypy/sha.py
   pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules._md5.txt
      - copied, changed from r77856, pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.md5.txt
   pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules._sha.txt
      - copied, changed from r77856, pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.sha.txt
   pypy/branch/fast-forward/pypy/module/_md5/
      - copied from r77856, pypy/branch/fast-forward/pypy/module/md5/
   pypy/branch/fast-forward/pypy/module/_sha/
      - copied from r77856, pypy/branch/fast-forward/pypy/module/sha/
Removed:
   pypy/branch/fast-forward/lib_pypy/hashlib.py
   pypy/branch/fast-forward/lib_pypy/md5.py
   pypy/branch/fast-forward/lib_pypy/sha.py
   pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.md5.txt
   pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.sha.txt
   pypy/branch/fast-forward/pypy/module/md5/
   pypy/branch/fast-forward/pypy/module/sha/
Modified:
   pypy/branch/fast-forward/pypy/config/pypyoption.py
   pypy/branch/fast-forward/pypy/module/_md5/test/test_md5.py
   pypy/branch/fast-forward/pypy/module/_sha/test/test_sha.py
Log:
Rename the builtin modules: md5 to _md5, sha to _sha.

Now the standard md5.py imports hashlib, 
which first tries to import _hashlib (based on openSSL)
and falls back to _md5.

Next step: have a working _hashlib on Windows.


Modified: pypy/branch/fast-forward/pypy/config/pypyoption.py
==============================================================================
--- pypy/branch/fast-forward/pypy/config/pypyoption.py	(original)
+++ pypy/branch/fast-forward/pypy/config/pypyoption.py	Wed Oct 13 11:46:24 2010
@@ -29,13 +29,13 @@
     ["_socket", "unicodedata", "mmap", "fcntl",
       "rctime" , "select", "zipimport", "_lsprof",
      "crypt", "signal", "_rawffi", "termios", "zlib",
-     "struct", "md5", "sha", "bz2", "_minimal_curses", "cStringIO",
+     "struct", "_md5", "_sha", "bz2", "_minimal_curses", "cStringIO",
      "thread", "itertools", "pyexpat", "_ssl", "cpyext", "array"]
 ))
 
 working_oo_modules = default_modules.copy()
 working_oo_modules.update(dict.fromkeys(
-    ["md5", "sha", "cStringIO", "itertools"]
+    ["_md5", "_sha", "cStringIO", "itertools"]
 ))
 
 # XXX this should move somewhere else, maybe to platform ("is this posixish"

Copied: pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules._md5.txt (from r77856, pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.md5.txt)
==============================================================================
--- pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.md5.txt	(original)
+++ pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules._md5.txt	Wed Oct 13 11:46:24 2010
@@ -1,4 +1,4 @@
-Use the built-in 'md5' module.
+Use the built-in '_md5' module.
 This module is expected to be working and is included by default.
 There is also a pure Python version in lib_pypy which is used
 if the built-in is disabled, but it is several orders of magnitude 

Copied: pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules._sha.txt (from r77856, pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.sha.txt)
==============================================================================
--- pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules.sha.txt	(original)
+++ pypy/branch/fast-forward/pypy/doc/config/objspace.usemodules._sha.txt	Wed Oct 13 11:46:24 2010
@@ -1,4 +1,4 @@
-Use the built-in 'sha' module.
+Use the built-in _'sha' module.
 This module is expected to be working and is included by default.
 There is also a pure Python version in lib_pypy which is used
 if the built-in is disabled, but it is several orders of magnitude 

Modified: pypy/branch/fast-forward/pypy/module/_md5/test/test_md5.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/md5/test/test_md5.py	(original)
+++ pypy/branch/fast-forward/pypy/module/_md5/test/test_md5.py	Wed Oct 13 11:46:24 2010
@@ -13,7 +13,7 @@
         Create a space with the md5 module and import it for use by the
         tests.
         """
-        cls.space = gettestobjspace(usemodules=['md5'])
+        cls.space = gettestobjspace(usemodules=['_md5'])
         cls.w_md5 = cls.space.appexec([], """():
             import md5
             return md5

Modified: pypy/branch/fast-forward/pypy/module/_sha/test/test_sha.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/sha/test/test_sha.py	(original)
+++ pypy/branch/fast-forward/pypy/module/_sha/test/test_sha.py	Wed Oct 13 11:46:24 2010
@@ -13,7 +13,7 @@
         Create a space with the sha module and import it for use by the
         tests.
         """
-        cls.space = gettestobjspace(usemodules=['sha'])
+        cls.space = gettestobjspace(usemodules=['_sha'])
         cls.w_sha = cls.space.appexec([], """():
             import sha
             return sha



More information about the Pypy-commit mailing list