Skip to content

Releases: mottosso/Qt.py

0.4.0

08 Sep 08:19
Compare
Choose a tag to compare

This release includes guards against problems related to co-existence.

Co-existence

Great care is taken to make sure Qt.py does not affect the original binding. This means no chances can be made to any pre-existing member.

Before, this care was made by eye. But now this care is automated and guarded against per commit, pull-request and at run-time (at minimal cost).

Theory

Notice the add and remap functions.

These replace the previous layout of remapping and adding.

# Before
PyQt4.QtWidgets = PyQt4.QtGui

# After
remap(PyQt4, "QtWidgets", PyQt4.QtGui)

By using a function as opposed to directly assigning, we lose out on readability, but gain security.

The safe=True argument is meant to facilitate times where we do overwrite, but ensure to include a full array of tests to ensure the original member has not been broken.

The Qt.__modified__ list of strings holds any members that do alter an existing member of the original binding.

Today, no member uses safe=False and __modified__ is empty as it should.

0.3.4

29 Aug 08:42
Compare
Choose a tag to compare

Changes.

PySide wasn't working under some circumstances, see stack trace on Travis.

0.3.3

03 Aug 12:10
Compare
Choose a tag to compare

0.3.1

18 Jun 15:35
Compare
Choose a tag to compare

Added support for vendoring.

myproject/
  vendor/
    Qt.py
# Absolute reference
from myproject.vendor.Qt import QtWidgets

# Local reference
from .vendor.Qt import QtWidgets

# Direct reference
from .vendor import Qt

You were able to bundle Qt.py before as well, via a slightly more awkward syntax.

from .vendor import Qt
from Qt import QtWidgets

0.3.0

04 Jun 20:22
Compare
Choose a tag to compare

This release boasts one addition and one change.

  • Dockerfile included
  • Qt.py no longer supports versions of PyQt4 lower than 4.7

Docker

This is for contributors to properly test their additions to the project before committing.

$ cd Qt.py
$ docker build -t mottosso/qtpy https://github.com/mottosso/Qt.py.git
$ docker run --rm -v $(pwd):/Qt.py mottosso/qtpy
# Tests require PySide and PyQt4 bindings to be installed ... ok
# Setting QT_PREFERRED_BINDING properly forces a particular binding ... ok
# Preferring None shouldn't import anything ... ok
# 
# ----------------------------------------------------------------------
# Ran 3 tests in 0.530s
# 
# OK

PyQt4 4.7 and above.

This means sip APIs are implicitly set to API v2 so as to align with PyQt5 and both PySide's. If you are using Qt.py alongside PyQt4, make sure you either import Qt.py first, or set the APIs beforehand.

import sip

sip.setapi("QString", 2)
sip.setapi("QVariant", 2)
sip.setapi("QDate", 2)
sip.setapi("QDateTime", 2)
sip.setapi("QTextStream", 2)
sip.setapi("QTime", 2)
sip.setapi("QUrl", 2)

import PyQt4

0.2.6

03 Jun 17:03
Compare
Choose a tag to compare

First automatic release on PyPI.