Re: PyQt4 and Python 3.0
On 2008-10-03, Phil Thompson wrote:
> On Fri, 3 Oct 2008 17:11:19 +0200, Detlev Offenbach
>
> <detlev <at> die-offenbachs.de> wrote:
> > Hi,
> >
> > will there be PyQt4 support for Python 3.0 once it goes final?
>
> Not straight away. I will take the opportunity to break backwards
> compatibility (eg. removing QVariant, QString, QChar, QByteArray etc),
> and those changes will be made over a period of time. So it may be a
> while before the API is stable enough for anything other than playing.
I've been waiting for someone to mention this...
Here's my personal "wish list" for Python 3/PyQt4 (including those that
Phil is going to do as he says above):
- No QString, only str, plus some static functions for things that str
doesn't provide, e.g., QString.simplified(s : str) -> str
- No QByteArray, only bytes (or bytearray)
- No QVariant, only object
- Guarantee that "from PyQt4.QtGui import *" and similar will only
import objects whose name begins with capital Q.
- Make PyQt more Pythonic. So use exceptions not error codes, for
example, make QFile.open() raise an exception on error. Also, provide
QDataStream.readColor(), QDataStream.readHostAddress(), etc., i.e., a
reader and a writer _method_ for every QDataStream type for those
allergic to << and >>.
- Support Qt collection types that don't have Python equivalents, e.g.,
(Continue reading)