Opened 7 years ago

Closed 7 years ago

#18799 closed enhancement (fixed)

Python 3 preparation: Change syntax of raise with traceback

Reported by: Wilfried Luebbe Owned by:
Priority: major Milestone: sage-6.10
Component: misc Keywords: python3
Cc: Merged in:
Authors: Wilfried Luebbe Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 249b939 (Commits, GitHub, GitLab) Commit: 249b939ee9144e5c2cfb939dda5a1c178cf82960
Dependencies: Stopgaps:

Status badges

Description

2to3 proposes changes for

raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)

These changes are invalid (see also #18796).

Several options are given in the documentation of python-future (see http://python-future.org/compatible_idioms.html#raising-exceptions).

This ticket is tracked as a dependency of meta-ticket #16052. The simple raise statements are fixed in #15990.

Change History (4)

comment:1 Changed 7 years ago by Wilfried Luebbe

Authors: Wilfried Luebbe
Branch: u/wluebbe/18799
Commit: 249b939ee9144e5c2cfb939dda5a1c178cf82960
Status: newneeds_review

New commits:

249b939Trac #18799: Change syntax of raise with traceback

comment:2 Changed 7 years ago by Frédéric Chapoton

I propose to convert the elliptic curve one to a simple raise (no traceback)

comment:3 Changed 7 years ago by Frédéric Chapoton

Milestone: sage-6.8sage-6.10
Reviewers: Frédéric Chapoton
Status: needs_reviewpositive_review

ok, let it be.

comment:4 Changed 7 years ago by Volker Braun

Branch: u/wluebbe/18799249b939ee9144e5c2cfb939dda5a1c178cf82960
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.