[issue43048] Printing RecursionError results in RecursionError

2021-07-12 Thread Łukasz Langa
Change by Łukasz Langa : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue43048] Printing RecursionError results in RecursionError

2021-07-12 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 489c27358376e772a61753c3f67daa836ca1eab7 by Vladimir Feinberg in branch '3.9': [3.9] bpo-43048: RecursionError traceback RecursionError bugfix for cpy3.9 (GH-24460) (#24460) https://github.com/python/cpython/commit/489c27358376e772a61753c3f67daa83

[issue43048] Printing RecursionError results in RecursionError

2021-02-05 Thread Vladimir Feinberg
Change by Vladimir Feinberg : -- keywords: +patch pull_requests: +23256 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24460 ___ Python tracker __

[issue43048] Printing RecursionError results in RecursionError

2021-02-02 Thread Vladimir Feinberg
Vladimir Feinberg added the comment: Yep, you're right. I'd be happy to (but I've never done it before, so please give me some time). On Tue, Feb 2, 2021 at 12:35 AM Irit Katriel wrote: > > Irit Katriel added the comment: > > It should truncate at the call that raised the recursion error, n

[issue43048] Printing RecursionError results in RecursionError

2021-02-02 Thread Irit Katriel
Irit Katriel added the comment: It should truncate at the call that raised the recursion error, not the first one. Do you want to create a patch? -- ___ Python tracker ___ __

[issue43048] Printing RecursionError results in RecursionError

2021-02-01 Thread Vladimir Feinberg
Vladimir Feinberg added the comment: Oh, yes, I suppose, that'll truncate to just the first TracebackException. On Mon, Feb 1, 2021 at 4:38 PM Irit Katriel wrote: > > Irit Katriel added the comment: > > I meant to catch the exception in the constructor’s recursive call, and if > necessary th

[issue43048] Printing RecursionError results in RecursionError

2021-02-01 Thread Irit Katriel
Irit Katriel added the comment: I meant to catch the exception in the constructor’s recursive call, and if necessary then the same again in format (if there are more function calls per exception in format, it will be necessary. The unit test from the 3.10 patch will tell). Would that not wor

[issue43048] Printing RecursionError results in RecursionError

2021-02-01 Thread Vladimir Feinberg
Vladimir Feinberg added the comment: A simple catch may not work (the very first TracebackException is the one that gets the RecursionError during initialization of its __context__), but one thing I was thinking about was walking the __context__ pointers and nulling out anything past the sys.ge

[issue43048] Printing RecursionError results in RecursionError

2021-01-30 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue43048] Printing RecursionError results in RecursionError

2021-01-30 Thread Irit Katriel
Irit Katriel added the comment: Maybe it is worth doing something less invasive in 3.9, such as catching the recursion error and truncating the output? -- status: closed -> open versions: -Python 3.10 ___ Python tracker

[issue43048] Printing RecursionError results in RecursionError

2021-01-29 Thread Vladimir Feinberg
Vladimir Feinberg added the comment: I agree with both the duplicate classification and am glad the fix works in 3.10. Thanks all for the responses. Given the issue can be triggered with a fairly benign setup (pandas triggers such an error, and logger.exception is idiomatic), I do think back

[issue43048] Printing RecursionError results in RecursionError

2021-01-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: With 3.9, exc.py produces for me Traceback (most recent call last): File "F:\Python\a\tem3.py", line 3, in f raise ValueError('hello') ValueError: hello During handling of the above exception, another exception occurred: Traceback (most recent call las

[issue43048] Printing RecursionError results in RecursionError

2021-01-28 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate status: open -> pending superseder: -> asyncio produces an unexpected traceback with recursive __getattribute__ ___ Python tracker _

[issue43048] Printing RecursionError results in RecursionError

2021-01-27 Thread Irit Katriel
Irit Katriel added the comment: This looks like a duplicate of issue 42848 which was fixed in 3.10. -- nosy: +iritkatriel ___ Python tracker ___ __

[issue43048] Printing RecursionError results in RecursionError

2021-01-27 Thread Vladimir Feinberg
New submission from Vladimir Feinberg : Python's standard logger provides an exception() method, which is to be called from except blocks to log out exception traces by pulling from sys.exc_info(). Per https://github.com/python/cpython/blob/3.9/Lib/logging/__init__.py#L617 , logger.exception(