This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: maximum recursion depth when using typing options
Type: crash Stage: resolved
Components: Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: Roy Shmueli, gvanrossum, python-dev
Priority: normal Keywords:

Created on 2016-05-13 12:57 by Roy Shmueli, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bug.py Roy Shmueli, 2016-05-13 12:57 a file that replicates the bug
Messages (7)
msg265473 - (view) Author: Roy Shmueli (Roy Shmueli) Date: 2016-05-13 12:57
While creating class of List and using a Optional as part of the typing system. I have got an error when I was importing one of my module. I was able to simplify the problem by creating a one module that replicate the crash.
msg265499 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-05-13 23:57
Ow, that's bad. :-(

Great job reducing this to a  minimal repro!

I'm guessing it's got to do with registration.  I'll try to figure out how to fix it; the fix should appear in Python 3.5.2.
msg265566 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-05-15 01:37
Simpler repro:

from collections import UserList
from typing import Sequence
class MyList(UserList, Sequence):
    pass
isinstance(None, Sequence)

No progress yet in understanding. :-(
msg265787 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-05-17 23:04
See also https://github.com/python/mypy/issues/1546 -- possibly it's the same issue.
msg265789 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-05-17 23:14
Actually, see https://github.com/python/typing/issues/222 instead.
msg265830 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-05-18 15:39
New changeset 79197e60e441 by Guido van Rossum in branch '3.5':
Fix #27014 -- infinite recursion using typing.py.
https://hg.python.org/cpython/rev/79197e60e441

New changeset a6c04626205f by Guido van Rossum in branch 'default':
Fix #27014 -- infinite recursion using typing.py. (Merge 3.5 -> 3.6.)
https://hg.python.org/cpython/rev/a6c04626205f
msg265831 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-05-18 15:46
Thanks to Kalle Tuure for the fix!
History
Date User Action Args
2022-04-11 14:58:31adminsetgithub: 71201
2016-05-18 15:46:14gvanrossumsetstatus: open -> closed
versions: + Python 3.6
messages: + msg265831

resolution: fixed
stage: resolved
2016-05-18 15:39:05python-devsetnosy: + python-dev
messages: + msg265830
2016-05-17 23:14:52gvanrossumsetmessages: + msg265789
2016-05-17 23:04:01gvanrossumsetmessages: + msg265787
2016-05-15 01:37:40gvanrossumsetmessages: + msg265566
2016-05-13 23:57:53gvanrossumsetassignee: gvanrossum
messages: + msg265499
2016-05-13 23:38:31terry.reedysetnosy: + gvanrossum
2016-05-13 12:57:16Roy Shmuelicreate