[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2016-01-19 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 627575e9a7aa by Serhiy Storchaka in branch '3.5':
Issue #25935: Garbage collector now breaks reference loops with OrderedDict.
https://hg.python.org/cpython/rev/627575e9a7aa

New changeset 5f0a08cfc4f6 by Serhiy Storchaka in branch 'default':
Issue #25935: Garbage collector now breaks reference loops with OrderedDict.
https://hg.python.org/cpython/rev/5f0a08cfc4f6

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2016-01-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In some cases (as in committed test) garbage collector was not able to collect 
a loop with OrderedDict at all.

--
assignee:  -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2015-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

An OrderedDict owns two references to every key (as a dict and from a linked 
list). Therefore it should visit it twice in tp_traverse.

Proposed patch fixes garbage collection for OrderedDict. It also rewrites 
OrderedDict clearing in more reentrant form (a linked list is detached from an 
OrderedDict before deallocating its nodes that can trigger executing user code).

--
keywords: +patch
stage:  -> patch review
versions: +Python 3.6
Added file: http://bugs.python.org/file41441/odict_traverse.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2015-12-28 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +eric.snow, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2015-12-28 Thread Tim Graham

Changes by Tim Graham :


--
nosy: +Tim.Graham

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2015-12-23 Thread Simon Charette

New submission from Simon Charette:

I attached a file with a reproduction test case that passes on Python 2.7 and 
3.4 but fails on 3.5.0 and 3.5.1

This might be solved by the improvement planed in #25410.

--
components: Extension Modules
files: test.py
messages: 256945
nosy: charettes
priority: normal
severity: normal
status: open
title: OrderedDict prevents garbage collection if a circulary referenced class 
is used as key
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41399/test.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com