Content-Length: 297940 | pFad | http://github.com/python/mypy/pull/19056/commits/292e849e985b8829f498e4c1fc6ee7f12a2a2759

0C feat(mypyc): proper weakref support by BobTheBuidler · Pull Request #19056 · python/mypy · GitHub
Skip to content

feat(mypyc): proper weakref support #19056

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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1f4a3a0
feat: proper weakref support
BobTheBuidler May 8, 2025
afbefea
Update emitclass.py
BobTheBuidler May 8, 2025
1a166d4
Update class_ir.py
BobTheBuidler May 8, 2025
65fa594
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 8, 2025
e8d9394
Update emitclass.py
BobTheBuidler May 8, 2025
887bc39
Update emitclass.py
BobTheBuidler May 8, 2025
85b07d5
Update class_ir.py
BobTheBuidler May 9, 2025
211ea3c
feat: support_weakrefs=True in mypyc_attr
BobTheBuidler May 9, 2025
fa595d2
Update vtable.py
BobTheBuidler May 9, 2025
292e849
Update prepare.py
BobTheBuidler May 9, 2025
259d89a
fix: serialization segfault
BobTheBuidler May 13, 2025
2949df3
chore: add comment
BobTheBuidler May 13, 2025
a116ab1
fix: deserialization discrepancy
BobTheBuidler May 13, 2025
7da4e53
feat(test): test mypyc_attr(supports_weakref=True)
BobTheBuidler May 13, 2025
34e4862
fix: set Py_TPFLAGS_MANAGED_WEAKREF flag on python>=3.12
BobTheBuidler May 13, 2025
f43eaae
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 13, 2025
bc96da2
Update emitclass.py
BobTheBuidler May 13, 2025
14ad56a
fix: handle weakrefs in tp_dealloc
BobTheBuidler May 13, 2025
bc82b3e
Update registry.py
BobTheBuidler May 16, 2025
7f59edf
Create weakref_ops.py
BobTheBuidler May 16, 2025
ca22a58
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2025
408576b
Update weakref_ops.py
BobTheBuidler May 16, 2025
fd2b234
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update prepare.py
  • Loading branch information
BobTheBuidler authored May 9, 2025
commit 292e849e985b8829f498e4c1fc6ee7f12a2a2759
6 changes: 3 additions & 3 deletions mypyc/irbuild/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ def prepare_class_def(
if attrs.get("serializable") is True:
# Supports copy.copy and pickle (including subclasses)
ir._serializable = True
if attrs.get("support_weakrefs") is True:
# Supports weakrefs (including subclasses)
ir.support_weakrefs = True
if attrs.get("supports_weakref") is True:
# Has a tp_weakrefoffset slot allowing the creation of weak references (including subclasses)
ir.supports_weakref = True

# Check for subclassing from builtin types
for cls in info.mro:
Expand Down
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/mypy/pull/19056/commits/292e849e985b8829f498e4c1fc6ee7f12a2a2759

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy