tim.one
(Tim Peters)
April 7, 2026, 11:37pm
1
I opened a “shallow” issue and encouraged a newer contributor to take a stab at it.
Issue:
opened 09:39PM - 06 Apr 26 UTC
type-bug
interpreter-core
easy
# Bug report
### Bug description:
Toward the tail end of `sys._debugmallocstat… s()` output there's an account of bytes sitting in various type-specific free lists, like so:|
```none
62 free PyDictObjects * 48 bytes each = 2,976
77 free PyDictKeysObjects * 32 bytes each = 2,464
6 free PyFloatObjects * 24 bytes each = 144
60 free PyListObjects * 40 bytes each = 2,400
231 free 1-sized PyTupleObjects * 40 bytes each = 9,240
...
```
However, for the container types that participate in cyclic gc (dict, list, tuple), the "bytes each" figurers are too small. Like:
```py
Python 3.14.1 (tags/v3.14.1:57e0d17, Dec 2 2025, 14:05:07) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.getsizeof([])
56
```
56 > 40, by 16. Same 16 missing for dicts and tuples. I suspect (but don't know) that they're missing the two pointers (_before_ the PYObject's type pointer) used by cyclic gc to link together the members of a generation.
Labeling as "easy", because it has to :wink: be shallow. A good exercise for somene to sharpen their archeological skills.
### CPython versions tested on:
3.14
### Operating systems tested on:
Windows
### Linked PRs
* gh-148190
PR:
main ← MazinSharaf:bytesizefix
opened 01:04AM - 07 Apr 26 UTC
# Fixing calculation of bytes in type-specific free lists
GH-148189: Fix misc… alculation of type-specific free list memory use
I tried to create a NEWS entry for it, from the web version of Blurb-it linked to from the PR:
Four tries now, with the same outcome:
Cannot create news file for GH-148190! Make sure you have access to that PR!
Anyone know how to get this unstuck? Perhaps it’s because I didn’t open the PR (it’s the would-be contributor’s branch, not mine)?
If the PR author didn’t give maintainers edit access then you won’t have access to edit anything directly. I also don’t know if blurb-it is classified as a maintainer to begin with in order to make such an edit.
1 Like
tim.one
(Tim Peters)
April 8, 2026, 1:56am
3
This appears on the PR page:
Maintainers are allowed to edit this pull request.
No idea here. Since I have to sign in to GitHub to use Blurb-it in this context, I assumed it used my credentials.
Anyway, since nobody said “me too!”, it’s apparently unique to me. I’ll ask the contributor to try on their own. Thanks for the clues!
1 Like
tim.one
(Tim Peters)
April 8, 2026, 5:36am
4
Follow-up: the contributor added a NEWS entry themself without problems. My mental model now is that Blurb-it can only be used to decorate your own pull requests.
2 Likes
Sviatoslav told me that GitHub - python/blurb_it: `blurb add` over the internet · GitHub says it gets installed as an app for your GitHub account, so I’m sure it’s a permission issue.
2 Likes
There is also an open feature request for this, python/blurb_it#10 .
1 Like
At this time you can only use it for your own PR. The “allow maintainer edit” setting doesn’t extend to the GitHub App (blurb-it). This is a limitation from GitHub’s side.
1 Like