[pypy-svn] pypy default: use pytest-2.0.3.dev1 which lazy-imports zlib and others in genscript plugin

hpk42 commits-noreply at bitbucket.org
Sat Mar 12 20:14:11 CET 2011


Author: holger krekel <holger at merlinux.eu>
Branch: 
Changeset: r42531:d2b00d622f59
Date: 2011-03-12 20:13 +0100
http://bitbucket.org/pypy/pypy/changeset/d2b00d622f59/

Log:	use pytest-2.0.3.dev1 which lazy-imports zlib and others in
	genscript plugin

diff --git a/pytest.py b/pytest.py
--- a/pytest.py
+++ b/pytest.py
@@ -3,7 +3,7 @@
 (pypy version of startup script)
 see http://pytest.org for details.
 """
-__version__ = '2.0.3.dev0' # base pytest version
+__version__ = '2.0.3.dev1' # base pytest version
 __all__ = ['main']
 
 from _pytest.core import main, UsageError, _preloadplugins

diff --git a/_pytest/genscript.py b/_pytest/genscript.py
--- a/_pytest/genscript.py
+++ b/_pytest/genscript.py
@@ -1,8 +1,5 @@
 """ generate a single-file self-contained version of py.test """
 import py
-import pickle
-import zlib
-import base64
 
 def find_toplevel(name):
     for syspath in py.std.sys.path:
@@ -31,9 +28,9 @@
     return name2src
 
 def compress_mapping(mapping):
-    data = pickle.dumps(mapping, 2)
-    data = zlib.compress(data, 9)
-    data = base64.encodestring(data)
+    data = py.std.pickle.dumps(mapping, 2)
+    data = py.std.zlib.compress(data, 9)
+    data = py.std.base64.encodestring(data)
     data = data.decode('ascii')
     return data
 
@@ -44,7 +41,6 @@
         mapping.update(pkg_to_mapping(name))
     return compress_mapping(mapping)
 
-
 def generate_script(entry, packages):
     data = compress_packages(packages)
     tmpl = py.path.local(__file__).dirpath().join('standalonetemplate.py')


More information about the Pypy-commit mailing list