8000 GH-117195: Avoid assertion error in `object.__sizeof__` by markshannon · Pull Request #117220 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-117195: Avoid assertion error in object.__sizeof__ #117220

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 5 commits into from
May 23, 2024
Merged
Changes from 1 commit
Commits
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
Add test
  • Loading branch information
markshannon committed Mar 25, 2024
commit 7374ca0cbfffbce61907e9ee1fa0d30fe0a006b0
2 changes: 2 additions & 0 deletions Lib/test/test_long.py
Original file line number Diff line number Diff line change
Expand Up @@ -1639,6 +1639,8 @@ class MyInt(int):
MyInt.__basicsize__ + MyInt.__itemsize__ * ndigits
)

# GC-117195 -- This shouldn't crash
object.__sizeof(1)

if __name__ == "__main__":
unittest.main()
0