Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.5] bpo-28556: Update to typing: treat subscripted generics as proxies (#265)#269

Merged
Mariatta merged 2 commits into
python:3.5python/cpython:3.5from
Mariatta:bpo-28556-3.5Mariatta/cpython:bpo-28556-3.5Copy head branch name to clipboard
Feb 25, 2017
Merged

[3.5] bpo-28556: Update to typing: treat subscripted generics as proxies (#265)#269
Mariatta merged 2 commits into
python:3.5python/cpython:3.5from
Mariatta:bpo-28556-3.5Mariatta/cpython:bpo-28556-3.5Copy head branch name to clipboard

Conversation

@Mariatta

@Mariatta Mariatta commented Feb 24, 2017

Copy link
Copy Markdown
Member

(cherry picked from commit abb3b8a)
(cherry picked from commit 365cb5b)

Comment thread Lib/typing.py
def __setattr__(self, attr, value):
# We consider all the subscripted genrics as proxies for original class
if attr.startswith('__') and attr.endswith('__'):
super(GenericMeta, self).__setattr__(attr, value)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a small question, why not just using super().__setattr__(attr, value) but super(GenericMeta, self)? Isn't that equivalent at this case?

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.

In principle you are right. This is mostly for similarity with next case (also there is Python 2 backport of this module, so that sometimes I just write the same code for both)

@Mariatta Mariatta merged commit bc33cd4 into python:3.5 Feb 25, 2017
@Mariatta Mariatta deleted the bpo-28556-3.5 branch February 25, 2017 00:41
akruis added a commit to akruis/cpython that referenced this pull request Jun 13, 2021
A failure to unpickle a frame could cause a NULL pointer access when
deallocating the frame. This has been fixed.
jaraco pushed a commit that referenced this pull request Dec 2, 2022
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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.