Author: Manuel Jacob <m...@manueljacob.de>
Branch: py3.5
Changeset: r90772:ccee05685caa
Date: 2017-03-20 20:42 +0100
http://bitbucket.org/pypy/pypy/changeset/ccee05685caa/

Log:    Remove verbose logging from _imp. This is now redundant because
        importlib and zipimport already do it.

diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py
--- a/pypy/module/imp/importing.py
+++ b/pypy/module/imp/importing.py
@@ -56,14 +56,6 @@
 
     return '.' + soabi + SO
 
-def log_pyverbose(space, level, message):
-    if space.sys.w_initialdict is None:
-        return # sys module not initialised, avoid recursion
-    verbose = space.sys.get_flag('verbose')
-    if verbose >= level:
-        w_stderr = space.sys.get('stderr')
-        space.call_method(w_stderr, "write", space.newtext(message))
-
 def has_so_extension(space):
     return (space.config.objspace.usemodules.cpyext or
             space.config.objspace.usemodules._cffi_backend)
@@ -136,8 +128,6 @@
 
 def load_c_extension(space, filename, modulename):
     from pypy.module.cpyext.api import load_extension_module
-    log_pyverbose(space, 1, "import %s # from %s\n" %
-                  (modulename, filename))
     load_extension_module(space, filename, modulename)
     # NB. cpyext.api.load_extension_module() can also delegate to _cffi_backend
 
@@ -391,9 +381,6 @@
     Load a module from a compiled file, execute it, and return its
     module object.
     """
-    log_pyverbose(space, 1, "import %s # compiled from %s\n" %
-                  (space.text_w(w_modulename), cpathname))
-
     if magic != get_pyc_magic(space):
         raise oefmt(space.w_ImportError, "Bad magic number in %s", cpathname)
     #print "loading pyc file:", cpathname
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to