Exceptions in OrderedDict when using python 2.6
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyqtgraph |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
Hello,
I am using official pyqtgraph 0.9.7 in a debian 6 64bits with Qt 4.6 and python 2.6
When I run some examples I get multiple exceptions when trying to delete an item from an ordereddict.
The bug can be reproduced easily by running the example: MultiPlotSpeedT
(exception trace in attachment
Because I am using python 2.6, pyqtgraph uses the internal implementation of ordereddict which seems to be buggy.
I propose the following fix in pgcollections.py:
try:
from collections import OrderedDict
except ImportError:
# fallback: try to use the ordereddict backport when using python 2.6
try:
from ordereddict import OrderedDict
except ImportError:
# backport not installed: use local OrderedDict
class OrderedDict():
# local impl
The patch is proposed by me and (Kif) Jerome Kieffer who already proposed something similar to vispy (issue #68 on github)