Exceptions in OrderedDict when using python 2.6

Bug #1241402 reported by tiagocoutinho
6
This bug affects 1 person
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: MultiPlotSpeedTest.py
(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

Revision history for this message
tiagocoutinho (coutinhotiago) wrote :
Revision history for this message
tiagocoutinho (coutinhotiago) wrote :

The patch is proposed by me and (Kif) Jerome Kieffer who already proposed something similar to vispy (issue #68 on github)

Revision history for this message
lcampagn (luke-campagnola) wrote :

Thank you!
Your patch will appear in 0.9.8.
FYI, there is now a github repository for pyqtgraph. If all goes well through the 0.9.8 release, we will officially switch over and shut down the launchpad repository.

Changed in pyqtgraph:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.