Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maximum recursion depth when using typing options #71201

Closed
RoyShmueli mannequin opened this issue May 13, 2016 · 7 comments
Closed

maximum recursion depth when using typing options #71201

RoyShmueli mannequin opened this issue May 13, 2016 · 7 comments
Assignees
Labels
type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@RoyShmueli
Copy link
Mannequin

RoyShmueli mannequin commented May 13, 2016

BPO 27014
Nosy @gvanrossum
Files
  • bug.py: a file that replicates the bug
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/gvanrossum'
    closed_at = <Date 2016-05-18.15:46:14.107>
    created_at = <Date 2016-05-13.12:57:16.728>
    labels = ['type-crash']
    title = 'maximum recursion depth when using typing options'
    updated_at = <Date 2016-05-18.15:46:14.105>
    user = 'https://bugs.python.org/RoyShmueli'

    bugs.python.org fields:

    activity = <Date 2016-05-18.15:46:14.105>
    actor = 'gvanrossum'
    assignee = 'gvanrossum'
    closed = True
    closed_date = <Date 2016-05-18.15:46:14.107>
    closer = 'gvanrossum'
    components = []
    creation = <Date 2016-05-13.12:57:16.728>
    creator = 'Roy Shmueli'
    dependencies = []
    files = ['42840']
    hgrepos = []
    issue_num = 27014
    keywords = []
    message_count = 7.0
    messages = ['265473', '265499', '265566', '265787', '265789', '265830', '265831']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'python-dev', 'Roy Shmueli']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue27014'
    versions = ['Python 3.5', 'Python 3.6']

    @RoyShmueli
    Copy link
    Mannequin Author

    RoyShmueli mannequin commented May 13, 2016

    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.

    @RoyShmueli RoyShmueli mannequin added the type-crash A hard crash of the interpreter, possibly with a core dump label May 13, 2016
    @gvanrossum
    Copy link
    Member

    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.

    @gvanrossum gvanrossum self-assigned this May 13, 2016
    @gvanrossum
    Copy link
    Member

    Simpler repro:

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

    No progress yet in understanding. :-(

    @gvanrossum
    Copy link
    Member

    See also python/mypy#1546 -- possibly it's the same issue.

    @gvanrossum
    Copy link
    Member

    Actually, see python/typing#222 instead.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 18, 2016

    New changeset 79197e60e441 by Guido van Rossum in branch '3.5':
    Fix bpo-27014 -- infinite recursion using typing.py.
    https://hg.python.org/cpython/rev/79197e60e441

    New changeset a6c04626205f by Guido van Rossum in branch 'default':
    Fix bpo-27014 -- infinite recursion using typing.py. (Merge 3.5 -> 3.6.)
    https://hg.python.org/cpython/rev/a6c04626205f

    @gvanrossum
    Copy link
    Member

    Thanks to Kalle Tuure for the fix!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant