[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2019-08-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2019-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2019-08-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: See also: https://bugs.python.org/msg131551 -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2019-08-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: There may still be some holes still remaining in OrderedDict but it doesn't seem to have been relevant in practice and will become even less so now that regular dicts are ordered and compact. If an issue does are arise with someone setting OrderedDict v

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that fixes an infinite loop reported in msg254071. May be this is not the best solution. It makes the behavior of Python and C implementation differ (the former just iterates a linked list, the latter raises an error). But to reproduce Python

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Wrong issue. The correct one is issue25410. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-11-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1594c23d8c2f by Serhiy Storchaka in branch '3.5': Issue #24726: Revert setting the value on the dict if https://hg.python.org/cpython/rev/1594c23d8c2f New changeset b391e97ccfe5 by Serhiy Storchaka in branch 'default': Issue #24726: Revert setting t

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks for your review Eric. test_delitem_2 was not added because it fails in just added TestCase for COrderedDict subclass. Added tests for direct calls of other dict methods as Eric suggested. During writing new tests for direct calls of other dict method

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-11-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 88d97cd99d16 by Serhiy Storchaka in branch '3.5': Issue #24726: Fixed issue number for previous changeset 59c7615ea921. https://hg.python.org/cpython/rev/88d97cd99d16 New changeset 965109e81ffa by Serhiy Storchaka in branch 'default': Issue #24726:

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-11-04 Thread Eric Snow
Eric Snow added the comment: Review posted. Aside from a couple minor comments, LGTM. Thanks for doing this. Incidentally, it should be possible to auto-detect independent changes to the underlying dict and sync the odict with those changes. However, doing so likely isn't worth it.

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: __repr__() allocates a list with the size len(od) and fills it iterating linked list. If the size of linked list is less then the size of the dict, the rest of the list is not initialized. Even worse things happened when the size of linked list is greater th

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-10-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-10-21 Thread Eric Snow
Eric Snow added the comment: FTR, this will likely involve more than just fixing odict_repr(). -- ___ Python tracker ___ ___ Python-bu

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is a bug in _PyObject_GenericSetAttrWithDict() Objects/object.c where a calls are made to PyDict_SetItem() and PyDict_DelItem() without checking first checking for PyDict_CheckExact(). * In PEP 372, OrderedDict was consciously specified to be a sub

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

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

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Marco, #-prefixed issue numbers like this, #24721, #24667, and #24685, are easier to read. -- ___ Python tracker ___ __

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Terry J. Reedy
Terry J. Reedy added the comment: Attached revised file that runs to completion on 2.7 and 3.x. -- nosy: +terry.reedy stage: -> test needed versions: +Python 2.7, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file40089/tem2.py ___ Python

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-31 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-26 Thread Marco Paolini
Marco Paolini added the comment: Linking related issues http://bugs.python.org/issue24721 http://bugs.python.org/issue24667 and http://bugs.python.org/issue24685 -- nosy: +mpaolini ___ Python tracker _

[issue24726] OrderedDict has strange behaviour when dict.__setitem__ is used.

2015-07-26 Thread Mark Shannon
New submission from Mark Shannon: Setting an item in an ordered dict via dict.__setitem__, or by using it as an object dictionary and setting an attribute on that object, creates a dictionary whose repr is: OrderedDict([]) Test case attached. -- components: Library (Lib) files: test.