[pypy-commit] pypy py3.3: Translation still not fixed. Committing so I can ask about the problem.

marky1991 pypy.commits at gmail.com
Wed Feb 24 04:06:53 EST 2016


Author: Mark Young <marky1991 at gmail.com>
Branch: py3.3
Changeset: r82471:4678e88f7915
Date: 2016-02-14 11:28 -0500
http://bitbucket.org/pypy/pypy/changeset/4678e88f7915/

Log:	Translation still not fixed. Committing so I can ask about the
	problem.

diff --git a/lib-python/3/importlib/_bootstrap.py b/lib-python/3/importlib/_bootstrap.py
--- a/lib-python/3/importlib/_bootstrap.py
+++ b/lib-python/3/importlib/_bootstrap.py
@@ -1496,6 +1496,7 @@
         raise TypeError("module name must be str, not {}".format(type(name)))
     if level < 0:
         raise ValueError('level must be >= 0')
+    #print(name, package, level)
     if package:
         if not isinstance(package, str):
             raise TypeError("__package__ not set to a string")
diff --git a/pypy/interpreter/module.py b/pypy/interpreter/module.py
--- a/pypy/interpreter/module.py
+++ b/pypy/interpreter/module.py
@@ -123,9 +123,11 @@
     def descr_module__repr__(self, space):
         if self.w_name is not None:
             name = space.unicode_w(space.repr(self.w_name))
+            nonrepr_name = space.unicode_w(self.w_name)
         else:
             name = u"'?'"
-        if self.getname(space) in self.space.builtin_modules:
+            nonrepr_name = u"?"
+        if nonrepr_name in self.space.builtin_modules:
             return space.wrap(u"<module %s (built-in)>" % name)
         try:
             w___file__ = space.getattr(self, space.wrap('__file__'))


More information about the pypy-commit mailing list