[issue44553] types.Union should support GC

2021-07-03 Thread Ken Jin
Ken Jin added the comment: Oh I didn't see Pablo's message on the PR: > @Fidget-Spinner For next occasions, the problem with this is that > PyObject_GC_Del cannot be called like that because it overrides a bunch of > cleanups like the call to _Py_ForgetReference and other possible handling.

[issue44553] types.Union should support GC

2021-07-03 Thread Ken Jin
Ken Jin added the comment: Woops, thanks for the quick fix Pablo. I'm guessing the takeaway here is that we should start tracking a GC-ed object as early as possible? -- ___ Python tracker

[issue44553] types.Union should support GC

2021-07-03 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the fix, Pablo! Ken Jin, we learned something today! -- nosy: +Guido.van.Rossum ___ Python tracker ___

[issue44553] types.Union should support GC

2021-07-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 000b9e803a7ec067da0a43f9a3fec16f1078215a by Miss Islington (bot) in branch '3.10': bpo-44553: Correct failure in tp_new for the union object (GH-27008) (GH-27009)

[issue44553] types.Union should support GC

2021-07-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44553] types.Union should support GC

2021-07-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset bc3961485639cc73de7c4c7eed1b56f3c74939bf by Pablo Galindo in branch 'main': bpo-44553: Correct failure in tp_new for the union object (GH-27008) https://github.com/python/cpython/commit/bc3961485639cc73de7c4c7eed1b56f3c74939bf

[issue44553] types.Union should support GC

2021-07-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +25569 pull_request: https://github.com/python/cpython/pull/27009 ___ Python tracker ___

[issue44553] types.Union should support GC

2021-07-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25568 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/27008 ___ Python tracker ___

[issue44553] types.Union should support GC

2021-07-03 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44553] types.Union should support GC

2021-07-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This commits seems to have broken the tracerefs buildbots: https://buildbot.python.org/all/#/builders/484/builds/322 https://buildbot.python.org/all/#/builders/678/builds/127 Please, take a look at soon as possible, otherwise per the buildbot policy

[issue44553] types.Union should support GC

2021-07-03 Thread Ken Jin
Ken Jin added the comment: Thanks for the helpful review and merge Serhiy. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44553] types.Union should support GC

2021-07-03 Thread miss-islington
miss-islington added the comment: New changeset 0856134542c1067d02c9027ddbb2a61916907e92 by Miss Islington (bot) in branch '3.10': bpo-44553 : Implement GC methods for types.Union (GH-26993) https://github.com/python/cpython/commit/0856134542c1067d02c9027ddbb2a61916907e92 --

[issue44553] types.Union should support GC

2021-07-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25563 pull_request: https://github.com/python/cpython/pull/27002 ___ Python tracker

[issue44553] types.Union should support GC

2021-07-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1097384ce964dd63686b1aac706cd0fa764c2dc9 by Ken Jin in branch 'main': bpo-44553 : Implement GC methods for types.Union (GH-26993) https://github.com/python/cpython/commit/1097384ce964dd63686b1aac706cd0fa764c2dc9 -- nosy:

[issue44553] types.Union should support GC

2021-07-02 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +25554 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26993 ___ Python tracker ___

[issue44553] types.Union should support GC

2021-07-02 Thread Ken Jin
New submission from Ken Jin : types.Union objects can contain reference cycles, therefore causing memory leaks. E.g.:: ``` import sys, gc from typing import TypeVar gc.collect() for _ in range(10): sys.gettotalrefcount() T = TypeVar('T') U = int | list[T] T.blah = U del T del U