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

bpo-44524: Fix an issue wherein `_GenericAlias._name` was not properly set for specialforms by BvB93 · Pull Request #27614 · python/cpython · GitHub

Repository navigation

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

Merged
ambv merged 4 commits into
python:mainfrom
BvB93:name
Aug 6, 2021
Merged

ambv merged 4 commits into
python:mainfrom
BvB93:name

Conversation

BvB93 commented Aug 5, 2021 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

An example from prior to this PR:

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

https://bugs.python.org/issue44524

Fidget-Spinner added needs backport to 3.10 type-bug An unexpected behavior, bug, or error labels Aug 5, 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

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

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

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

Great. Thanks!

ambv commented Aug 6, 2021

Copy link
Copy Markdown
Contributor

GHA Windows 32-bit failure in asyncio unrelated.

ambv merged commit 8bdf12e into python:main Aug 6, 2021

Copy link
Copy Markdown
Contributor

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

miss-islington pushed 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>

Copy link
Copy Markdown

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

BvB93 deleted the name branch August 6, 2021 13:40
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>

Copy link
Copy Markdown
Member

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 commented Aug 7, 2021

Copy link
Copy Markdown
Contributor

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

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

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL