Skip to content

0.4.0

Compare
Choose a tag to compare
@mottosso mottosso released this 08 Sep 08:19
· 706 commits to master since this release

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.