File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1681,7 +1681,7 @@ def printsolution(self, x):
16811681>>> g.next()
16821682>>> del g
16831683>>> sys.stderr.getvalue().startswith(
1684- ... "Exception exceptions. RuntimeError: 'generator ignored GeneratorExit' in "
1684+ ... "Exception RuntimeError: 'generator ignored GeneratorExit' in "
16851685... )
16861686True
16871687>>> sys.stderr = old
@@ -1798,7 +1798,7 @@ def printsolution(self, x):
17981798... del l
17991799... err = sys.stderr.getvalue().strip()
18001800... err.startswith(
1801- ... "Exception exceptions. RuntimeError: RuntimeError() in <"
1801+ ... "Exception RuntimeError: RuntimeError() in <"
18021802... )
18031803... err.endswith("> ignored")
18041804... len(err.splitlines())
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ What's New in Python 2.6 alpha 1?
1212Core and builtins
1313-----------------
1414
15+ - When printing an unraisable error, don't print exceptions. before the name.
16+ This duplicates the behavior whening normally printing exceptions.
17+
1518- Bug #1653736: Properly discard third argument to slot_nb_inplace_power.
1619
1720- PEP 352: Raising a string exception now triggers a TypeError. Attempting to
Original file line number Diff line number Diff line change @@ -603,7 +603,8 @@ PyErr_WriteUnraisable(PyObject *obj)
603603 PyFile_WriteString ("<unknown>" , f );
604604 else {
605605 char * modstr = PyString_AsString (moduleName );
606- if (modstr )
606+ if (modstr &&
607+ strcmp (modstr , "exceptions" ) != 0 )
607608 {
608609 PyFile_WriteString (modstr , f );
609610 PyFile_WriteString ("." , f );
You can’t perform that action at this time.
0 commit comments