Author: Carl Friedrich Bolz <[email protected]>
Branch: space-newtext
Changeset: r88318:d1caa90c2615
Date: 2016-11-10 18:19 +0100
http://bitbucket.org/pypy/pypy/changeset/d1caa90c2615/

Log:    various

diff --git a/pypy/module/_jitlog/interp_jitlog.py 
b/pypy/module/_jitlog/interp_jitlog.py
--- a/pypy/module/_jitlog/interp_jitlog.py
+++ b/pypy/module/_jitlog/interp_jitlog.py
@@ -12,7 +12,7 @@
 
 def JitlogError(space, e):
     w_JitlogError = space.fromcache(Cache).w_JitlogError
-    return OperationError(w_JitlogError, space.wrap(e.msg))
+    return OperationError(w_JitlogError, space.newtext(e.msg))
 
 @unwrap_spec(fileno=int)
 def enable(space, fileno):
diff --git a/pypy/module/_vmprof/interp_vmprof.py 
b/pypy/module/_vmprof/interp_vmprof.py
--- a/pypy/module/_vmprof/interp_vmprof.py
+++ b/pypy/module/_vmprof/interp_vmprof.py
@@ -47,7 +47,7 @@
 
 def VMProfError(space, e):
     w_VMProfError = space.fromcache(Cache).w_VMProfError
-    return OperationError(w_VMProfError, space.wrap(e.msg))
+    return OperationError(w_VMProfError, space.newtext(e.msg))
 
 
 @unwrap_spec(fileno=int, period=float)
@@ -60,9 +60,9 @@
     Must be smaller than 1.0
     """
     w_modules = space.sys.get('modules')
-    #if space.contains_w(w_modules, space.wrap('_continuation')):
-    #    space.warn(space.wrap("Using _continuation/greenlet/stacklet together 
"
-    #                          "with vmprof will crash"),
+    #if space.contains_w(w_modules, space.newtext('_continuation')):
+    #    space.warn(space.newtext("Using _continuation/greenlet/stacklet 
together "
+    #                             "with vmprof will crash"),
     #               space.w_RuntimeWarning)
     try:
         rvmprof.enable(fileno, period)
diff --git a/pypy/module/zipimport/interp_zipimport.py 
b/pypy/module/zipimport/interp_zipimport.py
--- a/pypy/module/zipimport/interp_zipimport.py
+++ b/pypy/module/zipimport/interp_zipimport.py
@@ -53,15 +53,14 @@
         except KeyError:
             raise OperationError(space.w_KeyError, space.newtext(name))
         assert isinstance(w_zipimporter, W_ZipImporter)
-        w = space.wrap
         w_d = space.newdict()
         for key, info in w_zipimporter.zip_file.NameToInfo.iteritems():
             if ZIPSEP != os.path.sep:
                 key = key.replace(ZIPSEP, os.path.sep)
             space.setitem(w_d, space.newtext(key), space.newtuple([
-                w(info.filename), w(info.compress_type), w(info.compress_size),
-                w(info.file_size), w(info.file_offset), w(info.dostime),
-                w(info.dosdate), w(info.CRC)]))
+                space.newtext(info.filename), 
space.newint(info.compress_type), space.newint(info.compress_size),
+                space.newint(info.file_size), space.newint(info.file_offset), 
space.newint(info.dostime),
+                space.newint(info.dosdate), space.newint(info.CRC)]))
         return w_d
 
     def keys(self, space):
@@ -74,7 +73,6 @@
         return space.newlist(values_w)
 
     def items(self, space):
-        w = space.wrap
         items_w = [space.newtuple([space.newtext(key), self.getitem(space, 
key)])
                    for key in self.cache.keys()]
         return space.newlist(items_w)
@@ -145,7 +143,6 @@
             return fname
 
     def import_py_file(self, space, modname, filename, buf, pkgpath):
-        w = space.wrap
         w_mod = Module(space, space.newtext(modname))
         real_name = self.filename + os.path.sep + self.corr_zname(filename)
         space.setattr(w_mod, space.newtext('__loader__'), self)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to