gh-116946: fully implement GC protocol for _functools._lru_list_elem#138334
gh-116946: fully implement GC protocol for _functools._lru_list_elem#138334picnixz wants to merge 1 commit intopython:mainfrom
_functools._lru_list_elem#138334Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
Oh there is a previous discussion: #76603. I'll check this. |
f4151b8 to
9b04072
Compare
|
Mmh, so this now boils down to whether we want to make sure that the GC protocol is correctly implemented or if we want to keep performances. |
|
The |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Concur with @rhettinger.
Note also that the cache dict is already visited, and it visits all its elements, so they will be visited twice with this PR.
Also, clearing the key in lru_list_elem_clear() can have bad consequences.
|
I see. Ok I'll close this one and will just change the immutability bit when necessary in the other PRs. |
This type is immutable but it is a true container type, so it needs the GC. However I need to measure performances.