Opened 8 years ago

Last modified 3 years ago

#16088 closed enhancement

Python 3 preparation: Py2 vs. Py3 different tracebacks in doctest — at Version 1

Reported by: Wilfried Luebbe Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: python3 Keywords: python3
Cc: Erik Bray, John Palmieri, vklein, Jeroen Demeyer Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Wilfried Luebbe)

Tracebacks can look different. For example in
Py2

>>> sys.version
'2.7.5+ (default, Feb 27 2014, 19:37:08) \n[GCC 4.8.1]'
>>> 1/0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: integer division or modulo by zero
>>> 

while in Py3

>>> sys.version
'3.3.2+ (default, Feb 28 2014, 00:52:16) \n[GCC 4.8.1]'
>>> 1/0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ZeroDivisionError: division by zero
>>> 

The number of effected modules and a suitable approach have to be determined.

This ticket is tracked as a dependency of meta-ticket ticket:16052.

Change History (1)

comment:1 Changed 8 years ago by Wilfried Luebbe

Description: modified (diff)
Summary: Python 3 preparation: Py2 vs. Py3 differences in tracebacksPython 3 preparation: Py2 vs. Py3 different tracebacks in doctest
Note: See TracTickets for help on using tickets.