[issue40504] Restore weakref support for lru_cache wrappers

2020-05-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 1253c3ef70ea5632d32ae19579a14152db0d45c1 by Dennis Sweeney in branch 'master': bpo-40504: Allow weakrefs to lru_cache objects (GH-19938) https://github.com/python/cpython/commit/1253c3ef70ea5632d32ae19579a14152db0d45c1 -- _

[issue40504] Restore weakref support for lru_cache wrappers

2020-05-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the PE :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue40504] Restore weakref support for lru_cache wrappers

2020-05-05 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +19253 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19938 ___ Python tracker ___ _

[issue40504] Restore weakref support for lru_cache wrappers

2020-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yes. That is the desired behavior. Use Objects/setobject.c and Include/setobject.h as a model. -- ___ Python tracker ___ __

[issue40504] Restore weakref support for lru_cache wrappers

2020-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: I can submit a PR. Just making sure I understand, is this essentially the desired behavior change? import weakref import functools if 0: from test.support import import_fresh_module functools = import_fresh_module('functools', blocked=['_functools'])

[issue40504] Restore weakref support for lru_cache wrappers

2020-05-04 Thread Raymond Hettinger
New submission from Raymond Hettinger : The pure python version of lru_cache() wrappers supported weak references. It's not essential, but I have used it a couple of times. In the spirit of PEP 399, the C version should add back the weakref support (and a test). -- components: Exten