[pypy-commit] pypy py3.6: back out changeset 6d08856e48f3 which is for python3.7

mattip pypy.commits at gmail.com
Mon Aug 19 03:05:12 EDT 2019


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.6
Changeset: r97214:ec4c8dc20895
Date: 2019-08-19 10:04 +0300
http://bitbucket.org/pypy/pypy/changeset/ec4c8dc20895/

Log:	back out changeset 6d08856e48f3 which is for python3.7

diff --git a/pypy/module/exceptions/interp_exceptions.py b/pypy/module/exceptions/interp_exceptions.py
--- a/pypy/module/exceptions/interp_exceptions.py
+++ b/pypy/module/exceptions/interp_exceptions.py
@@ -150,11 +150,8 @@
 
     def descr_repr(self, space):
         if self.args_w:
-            if len(self.args_w) == 1:
-                args_repr = b"(%s)" % (space.utf8_w(space.repr(self.args_w[0])), )
-            else:
-                args_repr = space.utf8_w(
-                    space.repr(space.newtuple(self.args_w)))
+            args_repr = space.utf8_w(
+                space.repr(space.newtuple(self.args_w)))
         else:
             args_repr = b"()"
         clsname = self.getclass(space).getname(space)
diff --git a/pypy/module/exceptions/test/test_exc.py b/pypy/module/exceptions/test/test_exc.py
--- a/pypy/module/exceptions/test/test_exc.py
+++ b/pypy/module/exceptions/test/test_exc.py
@@ -10,7 +10,7 @@
         assert repr(BaseException()) == 'BaseException()'
         raises(AttributeError, getattr, BaseException(), 'message')
         raises(AttributeError, getattr, BaseException(3), 'message')
-        assert repr(BaseException(3)) == 'BaseException(3)'
+        assert repr(BaseException(3)) == 'BaseException(3,)'
         assert str(BaseException(3)) == '3'
         assert BaseException().args == ()
         assert BaseException(3).args == (3,)
@@ -310,7 +310,7 @@
         assert ModuleNotFoundError("message", name="x").name == "x"
         assert ModuleNotFoundError("message", path="y").path == "y"
         raises(TypeError, ModuleNotFoundError, invalid="z")
-        assert repr(ModuleNotFoundError('test')) == "ModuleNotFoundError('test')"
+        assert repr(ModuleNotFoundError('test')) == "ModuleNotFoundError('test',)"
 
     def test_blockingioerror(self):
         args = ("a", "b", "c", "d", "e")


More information about the pypy-commit mailing list