Skip to content

bpo-37806:Fix infinite recursion with typing.get_type_hints.#15493

Closed
hongweipeng wants to merge 2 commits into
python:masterfrom
hongweipeng:issue37806-get_type_hints
Closed

bpo-37806:Fix infinite recursion with typing.get_type_hints.#15493
hongweipeng wants to merge 2 commits into
python:masterfrom
hongweipeng:issue37806-get_type_hints

Conversation

@hongweipeng

@hongweipeng hongweipeng commented Aug 25, 2019

Copy link
Copy Markdown
Contributor

@gvanrossum
gvanrossum removed their request for review August 25, 2019 20:36
@aeros aeros added needs backport to 3.8 type-bug An unexpected behavior, bug, or error labels Aug 25, 2019

@aeros aeros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @hongweipeng.

I was able to confirm the bug on the latest commit to master and verify that the PR branch fixes it.

Master:
image

PR Branch:
image

@aeros aeros left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor suggestions for the Misc/NEWS entry:

@@ -0,0 +1,2 @@
Fix infinite recursion with typing.get_type_hints.

@aeros aeros Aug 26, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This news entry can be condensed onto one line, the max character width for reST is 80.

Also, I would recommend adding a Sphinx role to link to the documentation for typing.get_type_hints. This can still fit on one line (exactly 80 chars in total).

Suggested change
Fix infinite recursion with typing.get_type_hints.
Fix infinite recursion from :func:`typing.get_type_hints`. Patch by hongweipeng.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok,thanks.

@@ -0,0 +1,2 @@
Fix infinite recursion with typing.get_type_hints.
Patch by hongweipeng.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above, this line can be condensed into the above line.

Suggested change
Patch by hongweipeng.

@ilevkivskyi

Copy link
Copy Markdown
Member

IIUC this is superseded by #15559 (which also looks better IMO), so I am closing this one.

@hongweipeng
hongweipeng deleted the issue37806-get_type_hints branch August 31, 2019 15:10
@hongweipeng
hongweipeng restored the issue37806-get_type_hints branch December 6, 2019 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants