[issue33418] Memory leaks in functions

2019-10-01 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16095 pull_request: https://github.com/python/cpython/pull/16502 ___ Python tracker ___

[issue33418] Memory leaks in functions

2019-09-10 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > It looks like a bug triggered on purpose. Absolutely. It's one of the many small issues that I found while working on PEP 590 and related things. -- ___ Python tracker

[issue33418] Memory leaks in functions

2019-09-10 Thread STINNER Victor
STINNER Victor added the comment: > But I am worrying about func.func_closure. Can it create cyclic reference in > real life applications? remove.__closure__ is part of a reference cycle in bpo-38006. I like func_clear() (which is still implemented in the master branch), but we need to

[issue33418] Memory leaks in functions

2019-09-10 Thread Thomas Wouters
Thomas Wouters added the comment: New changeset ccaea525885e41c5f1e566bb68698847faaa82ca by T. Wouters (Victor Stinner) in branch '3.8': Revert "bpo-33418: Add tp_clear for function object (GH-8058)" (GH-15826) https://github.com/python/cpython/commit/ccaea525885e41c5f1e566bb68698847faaa82ca

[issue33418] Memory leaks in functions

2019-09-10 Thread Inada Naoki
Inada Naoki added the comment: I'm OK to revert it in 3.8. But I am worrying about func.func_closure. Can it create cyclic reference in real life applications? -- ___ Python tracker

[issue33418] Memory leaks in functions

2019-09-10 Thread STINNER Victor
STINNER Victor added the comment: "f.__doc__ = f" or "f.__module__ = f" don't make any sense. It looks like a bug triggered on purpose. While it's bad, it's not a big deal. The fix (commit 3c452404ae178b742967589a0bb4a5ec768d76e0) is causing way worse issues than the "artificial" memory

[issue33418] Memory leaks in functions

2019-09-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +15474 pull_request: https://github.com/python/cpython/pull/15826 ___ Python tracker ___

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am going to re-close this until we understand exactly how this is interacting with https://bugs.python.org/issue38006 as this seems more complicated than our first hypothesis. -- resolution: -> fixed status: open -> closed

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: fixed -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: See also https://bugs.python.org/issue38006 -- resolution: -> fixed ___ Python tracker ___

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This change introduced the possibility to have function objects in an inconsistent state. For example, when calling tp_clear on the function some code must be invoked that tries to ca the function but some fields are NULL causing a crash. I think we

[issue33418] Memory leaks in functions

2018-07-03 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___

[issue33418] Memory leaks in functions

2018-07-03 Thread INADA Naoki
INADA Naoki added the comment: New changeset 3c452404ae178b742967589a0bb4a5ec768d76e0 by INADA Naoki in branch 'master': bpo-33418: Add tp_clear for function object (GH-8058) https://github.com/python/cpython/commit/3c452404ae178b742967589a0bb4a5ec768d76e0 --

[issue33418] Memory leaks in functions

2018-07-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > While this is a obvious bug, f.__module__ = f seems very unnatural. Sure. -- ___ Python tracker ___

[issue33418] Memory leaks in functions

2018-07-03 Thread INADA Naoki
INADA Naoki added the comment: I'm not sure this should be backported to 3.6 and 2.7. While this is a obvious bug, f.__module__ = f seems very unnatural. -- nosy: +inada.naoki ___ Python tracker

[issue33418] Memory leaks in functions

2018-07-03 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +7667 stage: -> patch review ___ Python tracker ___ ___

[issue33418] Memory leaks in functions

2018-05-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue33418] Memory leaks in functions

2018-05-03 Thread Jeroen Demeyer
Change by Jeroen Demeyer : -- components: +Interpreter Core type: -> resource usage ___ Python tracker ___

[issue33418] Memory leaks in functions

2018-05-03 Thread Jeroen Demeyer
New submission from Jeroen Demeyer : This is a memory leak: >>> while True: ...def f(): pass ...f.__doc__ = f This also: >>> while True: ... f = [].append