R. David Murray added the comment:
After reconsidering Terry's idle example, it seems to me that the change could
adversely impact existing code that already works around the lack of chained
tracebacks, even as idle does. So I committed this to 3.5 only as an
enhancement.
Thanks Claudiu.
Roundup Robot added the comment:
New changeset 2b212a8186e0 by R David Murray in branch 'default':
#17442: Add chained traceback support to InteractiveInterpreter.
https://hg.python.org/cpython/rev/2b212a8186e0
--
nosy: +python-dev
___
Python tracker
Claudiu Popa added the comment:
Indeed, it's a preexisting bug. I'll try to come up with a patch shortly.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
Claudiu Popa added the comment:
If the patch doesn't need anything else, can it be committed?
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
Berker Peksag added the comment:
Claudiu, did you see Jim Jewett's review on Rietveld?
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
Claudiu Popa added the comment:
Actually, no, it seems that I didn't receive any mail regarding them. I'll
update the patch accordingly.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
Claudiu Popa added the comment:
Here's the new version which fixes the comments from the review.
--
Added file: http://bugs.python.org/file36592/issue17442_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
Claudiu Popa added the comment:
Well, for instance, my use cases with InteractiveInterpreter are for debugging
or creating custom interpreters for various apps and in those cases the patch
helps, by giving better debugging clues through the exception cause. I agree
that this was overlooked
Claudiu Popa added the comment:
Also, solving this issue seems to be, partially, a prerequisite for issue14805.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
Changes by Claudiu Popa pcmantic...@gmail.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
___
R. David Murray added the comment:
I would lean toward bug fix. I'm sure this was just overlooked when exception
chaining was added, and as Claudiu says, the contract of code is to emulate the
interactive interpreter, so not doing so in this instance looks like a bug to
me.
It is certainly
Terry J. Reedy added the comment:
I am on the fence as to whether this should be treated as a bug fix or
enhancement. Claudiu's pydev post gives this as the current
InteractiveInterpreter behavior.
--
try:
...1 / 0
... except ZeroDivisionError as exc:
...
Claudiu.Popa added the comment:
Python's interactive interpreter doesn't show the offending code lines too. And
given the fact that code.InteractiveInterpreter tries to be an emulation of the
default interpreter, first the change should be addressed directly there, I
think. But I agree that
Changes by Zachary Ware zachary.w...@gmail.com:
--
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
___
Changes by Claudiu.Popa pcmantic...@gmail.com:
Added file: http://bugs.python.org/file34443/issue17442_1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
Changes by Claudiu.Popa pcmantic...@gmail.com:
Added file: http://bugs.python.org/file34361/issue17442.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +georg.brandl, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
___
Claudiu.Popa added the comment:
Could anyone review this patch, please?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +pitrou
stage: - patch review
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
___
Claudiu.Popa added the comment:
Here's an updated patch for the stdlib, with adapted tests.
--
keywords: +patch
nosy: +Claudiu.Popa
Added file: http://bugs.python.org/file31388/code.patch
___
Python tracker rep...@bugs.python.org
Philip Jenvey added the comment:
PyPy's fixed this here:
https://bitbucket.org/pypy/pypy/commits/1341a432e134
The tests just need to be adapted to the stdlib test suite
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
New submission from Philip Jenvey:
The code module claims to emulate Python's interactive interpreter but it fails
to emulate displaying of the exception cause.
It can utilize traceback._iter_chain to do this (see traceback.print_exception)
--
components: Library (Lib)
messages:
22 matches
Mail list logo