Opened 6 years ago

Closed 3 months ago

#16088 closed enhancement (worksforme)

py3: different exception messages in doctest

Reported by: wluebbe Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: python3 Keywords: python3
Cc: embray, jhpalmieri, vklein, jdemeyer Merged in:
Authors: Reviewers: Vincent Klein
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

Exceptions can look different. For example:

Python 2:

>>> 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
>>> 

Python 3:

>>> 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
>>> 

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

Change History (11)

comment:1 Changed 6 years ago by wluebbe

  • Description modified (diff)
  • Summary changed from Python 3 preparation: Py2 vs. Py3 differences in tracebacks to Python 3 preparation: Py2 vs. Py3 different tracebacks in doctest

comment:2 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:4 Changed 3 years ago by jdemeyer

  • Component changed from distribution to python3

comment:5 Changed 2 years ago by chapoton

  • Milestone changed from sage-6.4 to sage-8.0

comment:6 Changed 19 months ago by chapoton

See also that ones:

git grep -c "TypeError.*takes exactly"
src/sage/algebras/commutative_dga.py:1
src/sage/combinat/alternating_sign_matrix.py:1
src/sage/combinat/combinat.py:5
src/sage/functions/orthogonal_polys.py:1
src/sage/functions/other.py:1
src/sage/interfaces/scilab.py:1
src/sage/misc/explain_pickle.py:2
src/sage/modular/cusps_nf.py:1
src/sage/plot/colors.py:2
src/sage/plot/graphics.py:1
src/sage/rings/polynomial/polynomial_zz_pex.pyx:2
src/sage/symbolic/function.pyx:4

comment:7 Changed 19 months ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Python 3 preparation: Py2 vs. Py3 different tracebacks in doctest to py: different exception messages in doctest

comment:8 Changed 18 months ago by chapoton

  • Summary changed from py: different exception messages in doctest to py3: different exception messages in doctest

comment:9 Changed 3 months ago by chapoton

  • Cc embray jhpalmieri vklein jdemeyer added
  • Milestone changed from sage-8.0 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

I think that we can now close this one as invalid.

comment:10 Changed 3 months ago by vklein

  • Reviewers set to Vincent Klein
  • Status changed from needs_review to positive_review

comment:11 Changed 3 months ago by chapoton

  • Resolution set to worksforme
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.