FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-38908: Fix issue when non runtime_protocol does not raise TypeError by uriyyo · Pull Request #26067 · python/cpython · GitHub

/ cpython Public

bpo-38908: Fix issue when non runtime_protocol does not raise TypeError - #26067

Merged
gvanrossum merged 4 commits into
python:mainfrom
uriyyo:fix-issue-38908
May 12, 2021
Merged

bpo-38908: Fix issue when non runtime_protocol does not raise TypeError#26067
gvanrossum merged 4 commits into
python:mainfrom
uriyyo:fix-issue-38908

Conversation

uriyyo commented May 12, 2021
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

uriyyo force-pushed the fix-issue-38908 branch from ba9811d to 53d5008 Compare May 12, 2021 14:01
Fidget-Spinner self-requested a review May 12, 2021 14:11
uriyyo changed the title bpo-38908: Fix issue when non runtime_protocol does not raise TypeError bpo-38908: Add tests to cover case when non runtime_protocol does not raise TypeError May 12, 2021

Fidget-Spinner 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yurii, thanks for sending a PR to make sure there are no regressions for this long-standing issue!

Comment thread Lib/test/test_typing.py Outdated
uriyyo force-pushed the fix-issue-38908 branch from 9155670 to 179cb40 Compare May 12, 2021 14:29
uriyyo changed the title bpo-38908: Add tests to cover case when non runtime_protocol does not raise TypeError bpo-38908: Fix issue when non runtime_protocol does not raise TypeError May 12, 2021
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

uriyyo commented May 12, 2021

Copy link
Copy Markdown
Member Author

@Fidget-Spinner It is not regression, I made a mistake when said that this issue was not present at 3.11 version. This issue still present and this PR will fix it.

Copy link
Copy Markdown
Member

@Fidget-Spinner It is not regression, I made a mistake when said that this issue was not present at 3.11 version. This issue still present and this PR will fix it.

Oh interesting! class P(Protocol): ... raises as expected, but

class P(Protocol): 
    x : int

doesn't!

Fidget-Spinner 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. Once again, thank you for fixing this!

Comment thread Lib/typing.py
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>

gvanrossum 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks! Does this need backporting?

Copy link
Copy Markdown

@gvanrossum: Please replace # with GH- in the commit message next time. Thanks!

Copy link
Copy Markdown
Contributor

Thanks @uriyyo for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 12, 2021
…ror (pythonGH-26067)

(cherry picked from commit c40486a)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>

Copy link
Copy Markdown

GH-26073 is a backport of this pull request to the 3.10 branch.

bedevere-bot removed the needs backport to 3.10 only security fixes label May 12, 2021

Copy link
Copy Markdown
Contributor

Sorry, @uriyyo and @gvanrossum, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker c40486a32d7e37b01ead94e701d69847f5b60e30 3.9

Copy link
Copy Markdown
Member

Sorry, @uriyyo and @gvanrossum, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker c40486a32d7e37b01ead94e701d69847f5b60e30 3.9

I'm on it. It's clashing because the _allow_reckless_class_checks was previously _allow_reckless_class_cheks and the typo fix wasn't backported.

Copy link
Copy Markdown

GH-26075 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request May 12, 2021
…ror (GH-26067)

(cherry picked from commit c40486a)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
miss-islington pushed a commit that referenced this pull request May 12, 2021
…ypeError (GH-26067) (GH-26075)

(cherry picked from commit c40486a)

Co-authored-by: Yurii Karabas 1998uriyyo@gmail.com

Automerge-Triggered-By: GH:gvanrossum
Fidget-Spinner added a commit to Fidget-Spinner/cpython that referenced this pull request May 12, 2021
miss-islington pushed a commit that referenced this pull request May 12, 2021
…es not raise TypeError (GH-26067)" (GH-26077)

Reverts #26075

Automerge-Triggered-By: GH:gvanrossum
srittau pushed a commit to python/typing_extensions that referenced this pull request Apr 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL