Thank you Phil, just my 2 cents On 12 October 2010 22:45, Phil Thompson <[email protected]> wrote: > On Tue, 12 Oct 2010 15:50:21 +0100, Daniele Esposti <[email protected]> > wrote: >> Running the attached test under Python 2.7 raises an attribute error: >> >> Traceback (most recent call last): >> File "locker.py", line 11, in <module> >> with QtCore.QReadLocker( lock ): >> AttributeError: __exit__ >> >> Tested with Python 2.7, PyQt4 4.7.7-1, sip 4.11.1 under Windows and > Linux. >> The same code works well using Python 2.6.6, PyQt4 4.7.7-1, sip 4.11.1 >> under Windows and Linux. >> Under Windows I'm using the binary package; under Linux I'm using the >> source code. >> >> Is this a bug in QReadLocker() bindings ? > > It's caused by a change in the way context managers are implemented in > Python v2.7 (and v3.2). > > Fixed in tonight's SIP snapshot. > > Thanks, > Phil >
-- Daniele Esposti _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
