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

bpo-44524: Fix an issue wherein _GenericAlias._name was not properly set for specialforms #27614

Merged
merged 4 commits into from Aug 6, 2021

Conversation

@BvB93
Copy link
Contributor

@BvB93 BvB93 commented Aug 5, 2021

An example from prior to this PR:

>>> from typing import Union
>>> print(Union[int, float].__name__)
None

https://bugs.python.org/issue44524

Copy link
Contributor

@Fidget-Spinner Fidget-Spinner left a comment

LGTM in general. Thanks for the quick fix :). I just have a few minor comments below.

Lib/test/test_typing.py Show resolved Hide resolved
Lib/typing.py Outdated Show resolved Hide resolved
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Copy link
Contributor

@Fidget-Spinner Fidget-Spinner left a comment

Great. Thanks!

@ambv
Copy link
Contributor

@ambv ambv commented Aug 6, 2021

GHA Windows 32-bit failure in asyncio unrelated.

@ambv ambv merged commit 8bdf12e into python:main Aug 6, 2021
12 of 13 checks passed
12 of 13 checks passed
@github-actions
Docs
Details
@github-actions
Check for source changes
Details
@github-actions
Check if generated files are up to date
Details
@github-actions
Windows (x86) Windows (x86)
Details
@github-actions
Windows (x64)
Details
@github-actions
macOS
Details
@github-actions
Ubuntu
Details
@github-actions
Ubuntu SSL tests with OpenSSL
Details
@github-actions
Address sanitizer Address sanitizer
Details
Azure Pipelines PR #20210806.14 succeeded
Details
@travis-ci
Travis CI - Pull Request Build Passed
Details
@bedevere-bot
bedevere/issue-number Issue number 44524 found
Details
@bedevere-bot
bedevere/news News entry found in Misc/NEWS.d
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Aug 6, 2021

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

miss-islington added a commit to miss-islington/cpython that referenced this pull request Aug 6, 2021
…y set for specialforms (pythonGH-27614)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8bdf12e)

Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Aug 6, 2021

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

@BvB93 BvB93 deleted the BvB93:name branch Aug 6, 2021
miss-islington added a commit that referenced this pull request Aug 6, 2021
…y set for specialforms (GH-27614)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8bdf12e)

Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
@pablogsal
Copy link
Member

@pablogsal pablogsal commented Aug 6, 2021

Unfortunately this PR has introduced reference leaks:

❯ ./python -m test test_typing -R :
0:00:00 load avg: 1.12 Run tests sequentially
0:00:00 load avg: 1.12 [1/1] test_typing
beginning 9 repetitions
123456789
.........
test_typing leaked [29, 29, 29, 29] references, sum=116
test_typing leaked [10, 10, 10, 10] memory blocks, sum=40
test_typing failed (reference leak)

== Tests result: FAILURE ==

1 test failed:
    test_typing

1 re-run test:
    test_typing

Total duration: 1.2 sec
Tests result: FAILURE
@ambv
Copy link
Contributor

@ambv ambv commented Aug 7, 2021

Turns out this PR discovered refleaks that were there all along 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants