Issue2088

classification
Title: cannot override defaultdict.__missing__
Type: Severity: normal
Components: Library Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: bgr, indra, zyasoft
Priority: Keywords:

Created on 2013-09-15.14:07:53 by bgr, last changed 2014-06-25.16:02:22 by zyasoft.

Files
File name Uploaded Description Edit Remove
keydefaultdict.py bgr, 2013-09-15.14:07:52
Messages
msg8117 (view) Author: bgr (bgr) Date: 2013-09-15.14:07:52
When subclassing defaultdict, overridden __missing__ method is ignored. See the attached example code which demonstrates the issue.
msg8236 (view) Author: Indra Talip (indra) Date: 2014-02-01.07:41:52
Pull request at https://bitbucket.org/jython/jython/pull-request/26/fix-defaultdict-so-that-for-derived/diff fixes defaultdict so __missing__ in subclasses is called correctly.
msg8438 (view) Author: Indra Talip (indra) Date: 2014-05-18.11:16:44
Updated pull request based on LoadingCache rather MapMaker - https://bitbucket.org/jython/jython/pull-request/39/2088-fix-defaultdict-so-that-derived/diff
msg8458 (view) Author: Jim Baker (zyasoft) Date: 2014-05-21.20:30:29
This is under active review/development on Indra's pull request. It appears to be close to being fixed at this point, while still maintaining desired thread safety/concurrent semantics.

Target beta 4
msg8675 (view) Author: Jim Baker (zyasoft) Date: 2014-06-18.17:56:54
Fixed in http://hg.python.org/jython/rev/77dcd0a92088
History
Date User Action Args
2014-06-25 16:02:22zyasoftsetstatus: pending -> closed
2014-06-18 17:56:54zyasoftsetstatus: open -> pending
resolution: accepted -> fixed
messages: + msg8675
2014-05-21 20:30:29zyasoftsetnosy: + zyasoft
resolution: accepted
messages: + msg8458
2014-05-18 11:16:45indrasetmessages: + msg8438
2014-02-01 07:41:53indrasetnosy: + indra
messages: + msg8236
2013-09-15 14:07:53bgrcreate