bpo-38908: Fix issue when non runtime_protocol does not raise TypeError by uriyyo · Pull Request #26067 · python/cpython
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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yurii, thanks for sending a PR to make sure there are no regressions for this long-standing issue!
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
@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.
@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!
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Once again, thank you for fixing this!
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Does this need backporting?
@gvanrossum: Please replace # with GH- in the commit message next time. Thanks!
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>
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
Fidget-Spinner pushed a commit to Fidget-Spinner/cpython that referenced this pull request
May 12, 2021Sorry, @uriyyo and @gvanrossum, I could not cleanly backport this to
3.9due 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.
miss-islington added a commit that referenced this pull request
May 12, 2021miss-islington pushed a commit that referenced this pull request
May 12, 2021Fidget-Spinner added a commit to Fidget-Spinner/cpython that referenced this pull request
May 12, 2021This was referenced
May 23, 2023This 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