[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-07 Thread Raymond Hettinger
Raymond Hettinger added the comment: Closing as not-a-bug. It seems that the __del__ method in requests needs to make one of the adjustments suggested by Antoine. -- priority: high -> normal resolution: -> not a bug status: open -> closed ___ Pytho

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Concretely, the possible workarounds are: - don't do anything complex in your __del__ - be prepared to deal with unexpected errors in your __del__ - starting from Python 3.4, don't define __del__ and use weakref.finalize() instead: https://docs.python.org/3/lib

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: weakrefs are traditionally cleared by the cyclic GC before calling any __del__ method. This used to be mandatory to eschew situations where a weakref callback could see cleared objects, but produces the side effect that __del__ methods can see dead weakrefs. T

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Antoine, I could use a second pair of eyes to see what is going on there. It looks like an upstream __del__() method is trying to iterate over an OrderedDict that was already being shutdown (the hardroot link no longer exists). That said, I don't see how

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-01 Thread Piotr Dobrogost
Changes by Piotr Dobrogost : -- nosy: +piotr.dobrogost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger type: compile error -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-01 Thread sorin
New submission from sorin: The standard library implementation of an OrderedDict (which is included in Python 3.4) uses a weakref for the root reference. https://hg.python.org/cpython/file/534b26837a13/Lib/collections/__init__.py#l74 This was reported initially on https://github.com/kennethre