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

gh-96478: Test @overload on C functions #96479

Merged
merged 2 commits into from Sep 5, 2022

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Sep 1, 2022

Now, we have this covered, including a side-effect.

Lib/test/test_typing.py Outdated Show resolved Hide resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@gvanrossum gvanrossum removed their request for review September 1, 2022 22:20
@JelleZijlstra JelleZijlstra added the needs backport to 3.11 only security fixes label Sep 5, 2022
@JelleZijlstra JelleZijlstra merged commit f177f6f into python:main Sep 5, 2022
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @sobolevn and @JelleZijlstra, I had trouble checking out the 3.11 backport branch.
Please backport using cherry_picker on command line.
cherry_picker f177f6f29b069f522a0b3ba44eaae19852b6d2b0 3.11

@JelleZijlstra JelleZijlstra added needs backport to 3.11 only security fixes and removed needs backport to 3.11 only security fixes labels Sep 5, 2022
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-96604 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 5, 2022
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit f177f6f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 5, 2022
sobolevn added a commit to sobolevn/typing_extensions that referenced this pull request Sep 6, 2022
JelleZijlstra pushed a commit to python/typing_extensions that referenced this pull request Sep 6, 2022
@sweeneyde
Copy link
Member

sweeneyde commented Sep 6, 2022

I think this may be the cause of some buildbot failures.

In particular, on the second repetition of the test suite (e.g., when running -R3:3), I get this:

test test_typing failed -- Traceback (most recent call last):
  File "C:\Users\sween\Source\Repos\cpython2\cpython\Lib\unittest\mock.py", line 1359, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sween\Source\Repos\cpython2\cpython\Lib\test\test_typing.py", line 4398, in test_overload_on_compiled_functions
    self.assertEqual(typing._overload_registry, {})
AssertionError: defaultdict(<function OverloadTests.<lamb[91 chars]}})}) != {}

test_typing failed (1 failure)

cc @pablogsal

@sobolevn
Copy link
Member Author

sobolevn commented Sep 6, 2022

Fixed in #96615

@sweeneyde
Copy link
Member

Ah my bad, thanks!

miss-islington added a commit that referenced this pull request Sep 21, 2022
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit f177f6f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@vstinner
Copy link
Member

I think this may be the cause of some buildbot failures. In particular, on the second repetition of the test suite (e.g., when running -R3:3), I get this: (...) test_overload_on_compiled_functions() (...)

Right, all Refleaks 3.11 buildbots are failing since commit 2a5e333: the 3.11 branch also needs PR #96615 fix.

=> I created PR #97601 backport to fix test_typing in the 3.11 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir topic-typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants