Skip to content

gh-98348: Mention ReferenceError in weakref.proxy documentation #98355

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

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

fancidev
Copy link
Contributor

@fancidev fancidev commented Oct 17, 2022

Copy link
Contributor

@kumaraditya303 kumaraditya303 left a comment

Choose a reason for hiding this comment

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

>>> class Foo:pass
... 
>>> import weakref
>>> a = Foo()
>>> x = weakref.proxy(a)
>>> x
<weakproxy at 0x7f700eb87770 to Foo at 0x7f700eb8d190>
>>> del a
>>> x.__init__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ReferenceError: weakly-referenced object no longer exists

@miss-islington
Copy link
Contributor

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

@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Oct 26, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 26, 2022
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Oct 26, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 26, 2022
miss-islington added a commit that referenced this pull request Oct 26, 2022
miss-islington added a commit that referenced this pull request Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants