[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-13 Thread Irit Katriel
Irit Katriel added the comment: Yes, I agree this is more of a refactor than a bugfix. -- versions: +Python 3.10 -Python 3.8 ___ Python tracker ___ ___

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: Will be fixed in 3.10. I prefer not to backport the solution (Irit, do you agree?) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-12 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 6dfd1734f5b230bb8fbd2a9df806c1333b6652a8 by Irit Katriel in branch 'master': bpo-42848: remove recursion from TracebackException (GH-24158) https://github.com/python/cpython/commit/6dfd1734f5b230bb8fbd2a9df806c1333b6652a8 -- ___

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-11 Thread Irit Katriel
Irit Katriel added the comment: I've simplified the format() code in the PR, based on the observation that only one chained exception is ever emitted. I think it's reasonably simple now. -- ___ Python tracker _

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-07 Thread Irit Katriel
Irit Katriel added the comment: So, we have a contact chain of length almost equal to the recursion limit, which is too much to process recursively in python (in c it does work, hence the difference between the outputs of the OP's two scripts). The PR removes recursion from TracebackExceptio

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-07 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +22986 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24158 ___ Python tracker ___ ___

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-07 Thread Irit Katriel
Irit Katriel added the comment: Yes I'll have a look. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: I meant Irit. Silly autocorrect. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: No problem. Riot, are you interested in this? -- nosy: +Guido.van.Rossum, iritkatriel ___ Python tracker ___ __

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
asleep-cult added the comment: I'm not sure I have a deep enough understanding of how this works, so no -- ___ Python tracker ___ _

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: The recursion error is actually inside the traceback module. The reason is that the code there calls itself recursively for each level of context. Since bar() builds up an endless chain of contexts as it calls itself recursively, that chain is very long.

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
asleep-cult added the comment: Didn't show enough of the traceback to show that the latter does not suppress the Test exception Traceback (most recent call last): File "c:/Development/test/test.py", line 11, in bar x() File "c:/Development/test/test.py", line 7, in x raise Test('H

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
asleep-cult added the comment: I did test it with a simple recursive function but a more realistic test confirms that its not just __getattribute__ (which makes sense) import asyncio class Test(Exception): ... def x(): raise Test('Hello World!') def bar(): try: x()

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: Is there anything specific about __getattribute__ here? Wouldn't you have the same issue for *any* function that raises RecursionError called inside an async def? -- nosy: +gvanrossum ___ Python tracker

[issue42848] asyncio produces an unexpected traceback with recursive __getattribute__

2021-01-06 Thread asleep-cult
New submission from asleep-cult : The code below produces an unexpected traceback format that makes the source of an error very hard to find, this more than likely happens in less specific situations but this is how I came across it. I'm also not sure if this is an issue with asyncio, logging