◐ Shell
reader mode source ↗
Skip to content

bpo-37838: get_type_hints for wrapped functions with forward reference#17126

Merged
ilevkivskyi merged 5 commits into
python:masterfrom
benedwards14:wrapped_check_type_def
Nov 21, 2019
Merged

bpo-37838: get_type_hints for wrapped functions with forward reference#17126
ilevkivskyi merged 5 commits into
python:masterfrom
benedwards14:wrapped_check_type_def

Conversation

@benedwards14

@benedwards14 benedwards14 commented Nov 12, 2019

Copy link
Copy Markdown
Contributor

@brandtbucher brandtbucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

This looks like a good change to me! Just a few comments below to fix CI and clean things up.

@brandtbucher brandtbucher added the type-bug An unexpected behavior, bug, or error label Nov 12, 2019
@brandtbucher

Copy link
Copy Markdown
Member

Thanks for the PR @benedwards14!

This one should also have a NEWS entry. Just something simple, like:

:meth:`typing.get_type_hints` properly handles functions decorated with :meth:`functors.wraps`. 

@benedwards14

benedwards14 commented Nov 21, 2019

Copy link
Copy Markdown
Contributor Author

Hey @brandtbucher, thanks for the review. Here are the markups.

@brandtbucher brandtbucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Looks good! Just a couple of remaining style nitpicks:

@brandtbucher brandtbucher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Sorry, one last typo I spotted. Then good!

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
@brandtbucher

Copy link
Copy Markdown
Member

@ilevkivskyi ilevkivskyi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

Looks good, thanks!

@ilevkivskyi

Copy link
Copy Markdown
Member

(Added backport labels since this is a bugfix.)

@ilevkivskyi ilevkivskyi merged commit 0aca3a3 into python:master Nov 21, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @benedwards14 for the PR, and @ilevkivskyi for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-17324 is a backport of this pull request to the 3.8 branch.

@bedevere-bot

Copy link
Copy Markdown

GH-17325 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 21, 2019
pythonGH-17126)

https://bugs.python.org/issue37838
(cherry picked from commit 0aca3a3)

Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 21, 2019
pythonGH-17126)

https://bugs.python.org/issue37838
(cherry picked from commit 0aca3a3)

Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Nov 21, 2019
GH-17126)

https://bugs.python.org/issue37838
(cherry picked from commit 0aca3a3)

Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Nov 21, 2019
GH-17126)

https://bugs.python.org/issue37838
(cherry picked from commit 0aca3a3)

Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants