[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2021-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is still reproducible if increase the depth. In 3.8-3.10 it needs 329 nested classes, in 3.11 -- 496. Seems the limit is sys.getrecursionlimit()//k - 4, where k=4 in 3.7 and older, k=3 in 3.8-3.10, and k=2 in 3.11. It is much better than was initially,

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2021-12-11 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2021-12-05 Thread Irit Katriel
Irit Katriel added the comment: I am unable to reproduce this on 3.11. Is it still a problem? -- nosy: +iritkatriel ___ Python tracker ___

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-12 Thread Jamie Bliss
Jamie Bliss added the comment: I consider it debatable as to if this is a bug in ABC (for using recursion in a way that limits class tree depth) or in CPython (for accounting recursion in such a way you can get significantly shallower stacks). --

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-12 Thread Jamie Bliss
Changes by Jamie Bliss : -- nosy: +astronouth7303 ___ Python tracker ___ ___

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-10 Thread Anthony Scopatz
Anthony Scopatz added the comment: It certainly seems related. Attached is an image that displays the scaling of the cache example. The full notebook that generated this image is at [1]. The notebook shows that it does seem to converge towards a value of 1/6th. 1.

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-10 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file46251/cache_example.py ___ Python tracker ___

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Not sure if this is related, but I have a simple Cache class that gets a recursion error at a depth of about 166 calls (a sixth of the expected 1000). I suspect that the reason is the many of the steps individually add to the recursion depth causing the

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: -Python 3.3, Python 3.4 ___ Python tracker ___

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-09 Thread Anthony Scopatz
New submission from Anthony Scopatz: Classes that have an abstract base class somewhere in their hierarchy have a significantly reduced depth with respect to the recursion limit. In the attached minimal example, the class hierarchy is only able to be 245 deep past the ABC before a recursion