Hello community, here is the log from the commit of package python-QtPy for openSUSE:Factory checked in at 2017-08-29 11:46:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-QtPy (Old) and /work/SRC/openSUSE:Factory/.python-QtPy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-QtPy" Tue Aug 29 11:46:28 2017 rev:2 rq:519187 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-QtPy/python-QtPy.changes 2017-05-27 13:14:38.791047599 +0200 +++ /work/SRC/openSUSE:Factory/.python-QtPy.new/python-QtPy.changes 2017-08-29 11:47:45.269251682 +0200 @@ -1,0 +2,34 @@ +Mon Aug 28 16:05:01 UTC 2017 - toddrme2...@gmail.com + +- Update to Version 1.3.1 + + Bugs fixed + * Spurious cache files in PyPI tarball + * Importing qtpy should not raise exceptions + * No cache files included in the release tarball + * Remove Quantified Code badge because the service doesn't exist anymore + * Warn if QHeaderView deprecated methods are used +- Update to Version 1.3 + + New features + * Add support for PySide2 + * Add support for QtMultimedia + * Add support for PyQt 4.6 + + Bugs fixed + * Typo in readme title + * Update Readme for 1.3 release + * Add tests for untested modules + * Missing: QtOpenGL Module + * QDesktopServices split into QDesktopServices and QStandardPaths + * qInstallMessageHandler <-> qInstallMsgHandler + * Feature Request: PySide2 support + * Fix typo in Readme. + * Add compatibility for the rename of qInstallMsgHandler to qInstallMessageHandler + * Update Readme to reflect that we actually use the PySide2 layout + * Update Readme to mention that we now support PySide2. + * Add tests for Qtdesigner, QtNetwork, QtPrintSupport, QtSvg and QtTest. + * Follow QStandardPaths location in Qt5 for PyQt4/PySide + * Add a coveragerc file + * Add support for PyQt 4.6 + * Add a new QtOpenGL module + * Add PySide2 support + +------------------------------------------------------------------- Old: ---- QtPy-1.2.1.tar.gz New: ---- QtPy-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-QtPy.spec ++++++ --- /var/tmp/diff_new_pack.UFTpnw/_old 2017-08-29 11:47:46.677053252 +0200 +++ /var/tmp/diff_new_pack.UFTpnw/_new 2017-08-29 11:47:46.697050433 +0200 @@ -15,11 +15,11 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ -%bcond_without tests +%bcond_without test %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-QtPy -Version: 1.2.1 +Version: 1.3.1 Release: 0 License: MIT Summary: Abstraction layer on top of Qt bindings @@ -32,10 +32,13 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module qt5} BuildRequires: %{python_module sip} +%if %{with test} +BuildRequires: %{python_module pytest} +%endif Requires: python-qt5 Requires: python-sip -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch + %python_subpackages %description @@ -50,15 +53,21 @@ %prep %setup -q -n QtPy-%{version} +sed -i 's/\r$//' LICENSE.txt %build %python_build %install %python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/qtpy/tests/runtests.py +sed -i "s|^#!/usr/bin/env python$|#!%__$python|" %{buildroot}%{$python_sitelib}/qtpy/tests/runtests.py +$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/qtpy/tests/ +$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/qtpy/tests/ +%fdupes %{buildroot}%{$python_sitelib} +} -%if %{with tests} +%if %{with test} %check %python_exec setup.py test %endif ++++++ QtPy-1.2.1.tar.gz -> QtPy-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/CHANGELOG.md new/QtPy-1.3.1/CHANGELOG.md --- old/QtPy-1.2.1/CHANGELOG.md 2017-01-22 03:08:58.000000000 +0100 +++ new/QtPy-1.3.1/CHANGELOG.md 2017-08-21 18:45:03.000000000 +0200 @@ -1,5 +1,69 @@ # History of changes +## Version 1.3.1 (2017-08-21) + +### Bugs fixed + +**Issues** + +* [Issue 129](https://github.com/spyder-ide/qtpy/issues/129) - Spurious cache files in PyPI tarball +* [Issue 119](https://github.com/spyder-ide/qtpy/issues/119) - Importing qtpy should not raise exceptions + +In this release 2 issues were closed + +**Pull requests** + +* [PR 130](https://github.com/spyder-ide/qtpy/pull/130) - PR: No cache files included in the release tarball +* [PR 126](https://github.com/spyder-ide/qtpy/pull/126) - PR: Remove Quantified Code badge because the service doesn't exist anymore +* [PR 121](https://github.com/spyder-ide/qtpy/pull/121) - PR: Warn if QHeaderView deprecated methods are used + +In this release 3 pull requests were merged + + +---- + + +## Version 1.3 (2017-08-12) + +### New features + +* Add support for PySide2 +* Add support for QtMultimedia +* Add support for PyQt 4.6 + +### Bugs fixed + +**Issues** + +* [Issue 124](https://github.com/spyder-ide/qtpy/issues/124) - Typo in readme title +* [Issue 111](https://github.com/spyder-ide/qtpy/issues/111) - Update Readme for 1.3 release +* [Issue 110](https://github.com/spyder-ide/qtpy/issues/110) - Add tests for untested modules +* [Issue 101](https://github.com/spyder-ide/qtpy/issues/101) - Missing: QtOpenGL Module +* [Issue 89](https://github.com/spyder-ide/qtpy/issues/89) - QDesktopServices split into QDesktopServices and QStandardPaths +* [Issue 57](https://github.com/spyder-ide/qtpy/issues/57) - qInstallMessageHandler <-> qInstallMsgHandler +* [Issue 15](https://github.com/spyder-ide/qtpy/issues/15) - Feature Request: PySide2 support + +In this release 7 issues were closed + +**Pull requests** + +* [PR 125](https://github.com/spyder-ide/qtpy/pull/125) - PR: Fix typo in Readme. +* [PR 117](https://github.com/spyder-ide/qtpy/pull/117) - PR: Add compatibility for the rename of qInstallMsgHandler to qInstallMessageHandler +* [PR 115](https://github.com/spyder-ide/qtpy/pull/115) - PR: Update Readme to reflect that we actually use the PySide2 layout +* [PR 114](https://github.com/spyder-ide/qtpy/pull/114) - PR: Update Readme to mention that we now support PySide2. +* [PR 113](https://github.com/spyder-ide/qtpy/pull/113) - PR: Add tests for Qtdesigner, QtNetwork, QtPrintSupport, QtSvg and QtTest. +* [PR 112](https://github.com/spyder-ide/qtpy/pull/112) - PR: Follow QStandardPaths location in Qt5 for PyQt4/PySide +* [PR 109](https://github.com/spyder-ide/qtpy/pull/109) - PR: Add a coveragerc file +* [PR 106](https://github.com/spyder-ide/qtpy/pull/106) - PR: Add support for PyQt 4.6 +* [PR 102](https://github.com/spyder-ide/qtpy/pull/102) - PR: Add a new QtOpenGL module +* [PR 84](https://github.com/spyder-ide/qtpy/pull/84) - PR: Add PySide2 support + +In this release 10 pull requests were merged + + +---- + + ## Version 1.2.1 (2017/01/21) ### Bugs fixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/MANIFEST.in new/QtPy-1.3.1/MANIFEST.in --- old/QtPy-1.2.1/MANIFEST.in 2017-01-22 03:05:55.000000000 +0100 +++ new/QtPy-1.3.1/MANIFEST.in 2017-08-21 18:38:49.000000000 +0200 @@ -2,4 +2,4 @@ include CHANGELOG.md include LICENSE.txt include README.md -recursive-include qtpy/tests * +recursive-include qtpy/tests *.py *.ui diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/PKG-INFO new/QtPy-1.3.1/PKG-INFO --- old/QtPy-1.2.1/PKG-INFO 2017-01-22 03:10:28.000000000 +0100 +++ new/QtPy-1.3.1/PKG-INFO 2017-08-21 18:47:29.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: QtPy -Version: 1.2.1 +Version: 1.3.1 Summary: Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets. Home-page: https://github.com/spyder-ide/qtpy Author: Gonzalo Peña-Castellanos diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/QtPy.egg-info/PKG-INFO new/QtPy-1.3.1/QtPy.egg-info/PKG-INFO --- old/QtPy-1.2.1/QtPy.egg-info/PKG-INFO 2017-01-22 03:10:27.000000000 +0100 +++ new/QtPy-1.3.1/QtPy.egg-info/PKG-INFO 2017-08-21 18:47:28.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: QtPy -Version: 1.2.1 +Version: 1.3.1 Summary: Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets. Home-page: https://github.com/spyder-ide/qtpy Author: Gonzalo Peña-Castellanos diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/QtPy.egg-info/SOURCES.txt new/QtPy-1.3.1/QtPy.egg-info/SOURCES.txt --- old/QtPy-1.2.1/QtPy.egg-info/SOURCES.txt 2017-01-22 03:10:28.000000000 +0100 +++ new/QtPy-1.3.1/QtPy.egg-info/SOURCES.txt 2017-08-21 18:47:29.000000000 +0200 @@ -14,6 +14,7 @@ qtpy/QtGui.py qtpy/QtMultimedia.py qtpy/QtNetwork.py +qtpy/QtOpenGL.py qtpy/QtPrintSupport.py qtpy/QtSvg.py qtpy/QtTest.py @@ -27,6 +28,7 @@ qtpy/_patch/__init__.py qtpy/_patch/qcombobox.py qtpy/_patch/qheaderview.py +qtpy/tests/__init__.py qtpy/tests/conftest.py qtpy/tests/runtests.py qtpy/tests/test.ui @@ -34,10 +36,12 @@ qtpy/tests/test_main.py qtpy/tests/test_patch_qcombobox.py qtpy/tests/test_patch_qheaderview.py +qtpy/tests/test_qdesktopservice_split.py +qtpy/tests/test_qtcore.py +qtpy/tests/test_qtdesigner.py qtpy/tests/test_qtmultimedia.py -qtpy/tests/test_uic.py -qtpy/tests/__pycache__/conftest.cpython-35.pyc -qtpy/tests/__pycache__/test_main.cpython-35-PYTEST.pyc -qtpy/tests/__pycache__/test_patch_qcombobox.cpython-35-PYTEST.pyc -qtpy/tests/__pycache__/test_qtmultimedia.cpython-35-PYTEST.pyc -qtpy/tests/__pycache__/test_uic.cpython-35-PYTEST.pyc \ No newline at end of file +qtpy/tests/test_qtnetwork.py +qtpy/tests/test_qtprintsupport.py +qtpy/tests/test_qtsvg.py +qtpy/tests/test_qttest.py +qtpy/tests/test_uic.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/README.md new/QtPy-1.3.1/README.md --- old/QtPy-1.2.1/README.md 2017-01-22 03:07:05.000000000 +0100 +++ new/QtPy-1.3.1/README.md 2017-08-12 17:45:55.000000000 +0200 @@ -1,4 +1,4 @@ -# QtPy: Abtraction layer for PyQt5/PyQt4/PySide +# QtPy: Abstraction layer for PyQt5/PyQt4/PySide2/PySide Copyright © 2009- The Spyder Development Team. @@ -11,7 +11,6 @@ [![Build status](https://ci.appveyor.com/api/projects/status/62y6i02vhn4hefg0/branch/master?svg=true)](https://ci.appveyor.com/project/spyder-ide/qtpy/branch/master) [![CircleCI](https://circleci.com/gh/spyder-ide/qtpy.svg?style=shield)](https://circleci.com/gh/spyder-ide/qtpy) [![Coverage Status](https://coveralls.io/repos/github/spyder-ide/qtpy/badge.svg?branch=master)](https://coveralls.io/github/spyder-ide/qtpy?branch=master) -[![Code Issues](https://www.quantifiedcode.com/api/v1/project/c769241c7d7f4463b1e6f67863dabace/badge.svg)](https://www.quantifiedcode.com/app/project/c769241c7d7f4463b1e6f67863dabace) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/spyder-ide/qtpy/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/spyder-ide/qtpy/?branch=master) ## Description @@ -19,11 +18,11 @@ **QtPy** is a small abstraction layer that lets you write applications using a single API call to either PyQt or PySide. -It provides support for PyQt5, PyQt4 and PySide using the PyQt5 layout (where -the QtGui module has been split into QtGui and QtWidgets). +It provides support for PyQt5, PyQt4, PySide2 and PySide using the Qt5 layout +(where the QtGui module has been split into QtGui and QtWidgets). -Basically, you write your code as if you were using PyQt5 but import Qt modules -from `qtpy` instead of `PyQt5`. +Basically, you write your code as if you were using PySide2 but import Qt modules +from `qtpy` instead of `PySide2` (or `PyQt5`) ### Attribution and acknowledgements @@ -46,7 +45,7 @@ ### Requirements -You need PyQt5, PyQt4 or PySide installed in your system to make use +You need PyQt5, PyQt4, PySide2 or PySide installed in your system to make use of QtPy. If several of these packages are found, PyQt5 is used by default unless you set the `QT_API` environment variable. @@ -54,6 +53,7 @@ * `pyqt5` (to use PyQt5). * `pyqt` or `pyqt4` (to use PyQt4). +* `pyside2` (to use PySide2) * `pyside` (to use PySide). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtCore.py new/QtPy-1.3.1/qtpy/QtCore.py --- old/QtPy-1.2.1/qtpy/QtCore.py 2017-01-02 23:05:09.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtCore.py 2017-08-12 17:19:03.000000000 +0200 @@ -10,7 +10,7 @@ Provides QtCore classes and functions. """ -from . import PYQT5, PYQT4, PYSIDE, PythonQtError +from . import PYQT5, PYSIDE2, PYQT4, PYSIDE, PythonQtError if PYQT5: @@ -22,6 +22,8 @@ # Those are imported from `import *` del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR +elif PYSIDE2: + from PySide2.QtCore import * elif PYQT4: from PyQt4.QtCore import * # Those are things we inherited from Spyder that fix crazy crashes under @@ -35,14 +37,58 @@ QItemSelectionRange, QSortFilterProxyModel, QStringListModel) from PyQt4.QtCore import QT_VERSION_STR as __version__ + from PyQt4.QtCore import qInstallMsgHandler as qInstallMessageHandler + + # QDesktopServices has has been split into (QDesktopServices and + # QStandardPaths) in Qt5 + # This creates a dummy class that emulates QStandardPaths + from PyQt4.QtGui import QDesktopServices as _QDesktopServices + + class QStandardPaths(): + StandardLocation = _QDesktopServices.StandardLocation + displayName = _QDesktopServices.displayName + DesktopLocation = _QDesktopServices.DesktopLocation + DocumentsLocation = _QDesktopServices.DocumentsLocation + FontsLocation = _QDesktopServices.FontsLocation + ApplicationsLocation = _QDesktopServices.ApplicationsLocation + MusicLocation = _QDesktopServices.MusicLocation + MoviesLocation = _QDesktopServices.MoviesLocation + PicturesLocation = _QDesktopServices.PicturesLocation + TempLocation = _QDesktopServices.TempLocation + HomeLocation = _QDesktopServices.HomeLocation + DataLocation = _QDesktopServices.DataLocation + CacheLocation = _QDesktopServices.CacheLocation # Those are imported from `import *` - del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR + del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR, qInstallMsgHandler elif PYSIDE: from PySide.QtCore import * from PySide.QtGui import (QItemSelection, QItemSelectionModel, QItemSelectionRange, QSortFilterProxyModel, QStringListModel) + from PySide.QtCore import qInstallMsgHandler as qInstallMessageHandler + del qInstallMsgHandler + + # QDesktopServices has has been split into (QDesktopServices and + # QStandardPaths) in Qt5 + # This creates a dummy class that emulates QStandardPaths + from PySide.QtGui import QDesktopServices as _QDesktopServices + + class QStandardPaths(): + StandardLocation = _QDesktopServices.StandardLocation + displayName = _QDesktopServices.displayName + DesktopLocation = _QDesktopServices.DesktopLocation + DocumentsLocation = _QDesktopServices.DocumentsLocation + FontsLocation = _QDesktopServices.FontsLocation + ApplicationsLocation = _QDesktopServices.ApplicationsLocation + MusicLocation = _QDesktopServices.MusicLocation + MoviesLocation = _QDesktopServices.MoviesLocation + PicturesLocation = _QDesktopServices.PicturesLocation + TempLocation = _QDesktopServices.TempLocation + HomeLocation = _QDesktopServices.HomeLocation + DataLocation = _QDesktopServices.DataLocation + CacheLocation = _QDesktopServices.CacheLocation + import PySide.QtCore __version__ = PySide.QtCore.__version__ else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtGui.py new/QtPy-1.3.1/qtpy/QtGui.py --- old/QtPy-1.2.1/qtpy/QtGui.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtGui.py 2017-05-11 17:36:04.000000000 +0200 @@ -13,36 +13,46 @@ the ``PyQt5.QtGui`` module. """ -from . import PYQT5, PYQT4, PYSIDE, PythonQtError +from . import PYQT5, PYQT4, PYSIDE, PYSIDE2, PythonQtError if PYQT5: from PyQt5.QtGui import * +elif PYSIDE2: + from PySide2.QtGui import * elif PYQT4: + try: + # Older versions of PyQt4 do not provide these + from PyQt4.QtGui import (QGlyphRun, QMatrix2x2, QMatrix2x3, + QMatrix2x4, QMatrix3x2, QMatrix3x3, + QMatrix3x4, QMatrix4x2, QMatrix4x3, + QMatrix4x4, QTouchEvent, QQuaternion, + QRadialGradient, QRawFont, QStaticText, + QVector2D, QVector3D, QVector4D, + qFuzzyCompare) + except ImportError: + pass from PyQt4.Qt import QKeySequence, QTextCursor from PyQt4.QtGui import (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard, QCloseEvent, QColor, QConicalGradient, QContextMenuEvent, QCursor, - QDesktopServices, QDoubleValidator, QDrag, + QDoubleValidator, QDrag, QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent, QDropEvent, QFileOpenEvent, QFocusEvent, QFont, QFontDatabase, QFontInfo, QFontMetrics, - QFontMetricsF, QGlyphRun, QGradient, QHelpEvent, + QFontMetricsF, QGradient, QHelpEvent, QHideEvent, QHoverEvent, QIcon, QIconDragEvent, QIconEngine, QImage, QImageIOHandler, QImageReader, QImageWriter, QInputEvent, QInputMethodEvent, QKeyEvent, QLinearGradient, - QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2, - QMatrix3x3, QMatrix3x4, QMatrix4x2, QMatrix4x3, - QMatrix4x4, QMouseEvent, QMoveEvent, QMovie, + QMouseEvent, QMoveEvent, QMovie, QPaintDevice, QPaintEngine, QPaintEngineState, QPaintEvent, QPainter, QPainterPath, QPainterPathStroker, QPalette, QPen, QPicture, QPictureIO, QPixmap, QPixmapCache, QPolygon, - QPolygonF, QQuaternion, QRadialGradient, QRawFont, - QRegExpValidator, QRegion, QResizeEvent, + QPolygonF, QRegExpValidator, QRegion, QResizeEvent, QSessionManager, QShortcutEvent, QShowEvent, - QStandardItem, QStandardItemModel, QStaticText, + QStandardItem, QStandardItemModel, QStatusTipEvent, QSyntaxHighlighter, QTabletEvent, QTextBlock, QTextBlockFormat, QTextBlockGroup, QTextBlockUserData, QTextCharFormat, @@ -53,17 +63,28 @@ QTextLength, QTextLine, QTextList, QTextListFormat, QTextObject, QTextObjectInterface, QTextOption, QTextTable, QTextTableCell, QTextTableCellFormat, - QTextTableFormat, QTouchEvent, QTransform, - QValidator, QVector2D, QVector3D, QVector4D, - QWhatsThisClickedEvent, QWheelEvent, + QTextTableFormat, QTransform, + QValidator, QWhatsThisClickedEvent, QWheelEvent, QWindowStateChangeEvent, qAlpha, qBlue, - qFuzzyCompare, qGray, qGreen, qIsGray, qRed, qRgb, + qGray, qGreen, qIsGray, qRed, qRgb, qRgba, QIntValidator) + + # QDesktopServices has has been split into (QDesktopServices and + # QStandardPaths) in Qt5 + # It only exposes QDesktopServices that are still in pyqt5 + from PyQt4.QtGui import QDesktopServices as _QDesktopServices + + class QDesktopServices(): + openUrl = _QDesktopServices.openUrl + setUrlHandler = _QDesktopServices.setUrlHandler + unsetUrlHandler = _QDesktopServices.unsetUrlHandler + + elif PYSIDE: from PySide.QtGui import (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard, QCloseEvent, QColor, QConicalGradient, QContextMenuEvent, QCursor, - QDesktopServices, QDoubleValidator, QDrag, + QDoubleValidator, QDrag, QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent, QDropEvent, QFileOpenEvent, QFocusEvent, QFont, QFontDatabase, QFontInfo, QFontMetrics, @@ -99,5 +120,14 @@ QWindowStateChangeEvent, qAlpha, qBlue, qGray, qGreen, qIsGray, qRed, qRgb, qRgba, QIntValidator) + # QDesktopServices has has been split into (QDesktopServices and + # QStandardPaths) in Qt5 + # It only exposes QDesktopServices that are still in pyqt5 + from PySide.QtGui import QDesktopServices as _QDesktopServices + + class QDesktopServices(): + openUrl = _QDesktopServices.openUrl + setUrlHandler = _QDesktopServices.setUrlHandler + unsetUrlHandler = _QDesktopServices.unsetUrlHandler else: raise PythonQtError('No Qt bindings could be found') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtMultimedia.py new/QtPy-1.3.1/qtpy/QtMultimedia.py --- old/QtPy-1.2.1/qtpy/QtMultimedia.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtMultimedia.py 2017-05-11 17:36:04.000000000 +0200 @@ -1,10 +1,15 @@ from . import PYQT5 from . import PYQT4 from . import PYSIDE +from . import PYSIDE2 if PYQT5: from PyQt5.QtMultimedia import * +elif PYSIDE2: + # Current wheels don't have this module + # from PySide2.QtMultimedia import * + pass elif PYQT4: from PyQt4.QtMultimedia import * from PyQt4.QtGui import QSound diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtNetwork.py new/QtPy-1.3.1/qtpy/QtNetwork.py --- old/QtPy-1.2.1/qtpy/QtNetwork.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtNetwork.py 2017-05-11 17:36:04.000000000 +0200 @@ -10,11 +10,13 @@ Provides QtNetwork classes and functions. """ -from . import PYQT5, PYQT4, PYSIDE, PythonQtError +from . import PYQT5, PYSIDE2, PYQT4, PYSIDE, PythonQtError if PYQT5: from PyQt5.QtNetwork import * +elif PYSIDE2: + from PySide2.QtNetwork import * elif PYQT4: from PyQt4.QtNetwork import * elif PYSIDE: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtOpenGL.py new/QtPy-1.3.1/qtpy/QtOpenGL.py --- old/QtPy-1.2.1/qtpy/QtOpenGL.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtOpenGL.py 2017-05-11 17:36:04.000000000 +0200 @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# ----------------------------------------------------------------------------- +# Copyright © 2009- The Spyder Development Team +# +# Licensed under the terms of the MIT License +# (see LICENSE.txt for details) +# ----------------------------------------------------------------------------- +"""Provides QtOpenGL classes and functions.""" + +# Local imports +from . import PYQT4, PYQT5, PYSIDE, PythonQtError + +if PYQT5: + from PyQt5.QtOpenGL import * +elif PYQT4: + from PyQt4.QtOpenGL import * +elif PYSIDE: + from PySide.QtOpenGL import * +else: + raise PythonQtError('No Qt bindings could be found') + +del PYQT4, PYQT5, PYSIDE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtPrintSupport.py new/QtPy-1.3.1/qtpy/QtPrintSupport.py --- old/QtPy-1.2.1/qtpy/QtPrintSupport.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtPrintSupport.py 2017-05-11 17:36:04.000000000 +0200 @@ -9,11 +9,13 @@ Provides QtPrintSupport classes and functions. """ -from . import PYQT5, PYQT4, PYSIDE, PythonQtError +from . import PYQT5, PYQT4,PYSIDE2, PYSIDE, PythonQtError if PYQT5: from PyQt5.QtPrintSupport import * +elif PYSIDE2: + from PySide2.QtPrintSupport import * elif PYQT4: from PyQt4.QtGui import (QAbstractPrintDialog, QPageSetupDialog, QPrintDialog, QPrintEngine, QPrintPreviewDialog, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtSvg.py new/QtPy-1.3.1/qtpy/QtSvg.py --- old/QtPy-1.2.1/qtpy/QtSvg.py 2017-01-02 22:17:23.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtSvg.py 2017-05-11 17:36:04.000000000 +0200 @@ -8,10 +8,12 @@ """Provides QtSvg classes and functions.""" # Local imports -from . import PYQT4, PYQT5, PYSIDE, PythonQtError +from . import PYQT4, PYSIDE2, PYQT5, PYSIDE, PythonQtError if PYQT5: from PyQt5.QtSvg import * +elif PYSIDE2: + from PySide2.QtSvg import * elif PYQT4: from PyQt4.QtSvg import * elif PYSIDE: @@ -19,4 +21,4 @@ else: raise PythonQtError('No Qt bindings could be found') -del PYQT4, PYQT5, PYSIDE +del PYQT4, PYQT5, PYSIDE, PYSIDE2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtTest.py new/QtPy-1.3.1/qtpy/QtTest.py --- old/QtPy-1.2.1/qtpy/QtTest.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtTest.py 2017-05-11 17:36:04.000000000 +0200 @@ -10,11 +10,13 @@ Provides QtTest and functions """ -from . import PYQT5, PYQT4, PYSIDE, PythonQtError +from . import PYQT5,PYSIDE2, PYQT4, PYSIDE, PythonQtError if PYQT5: from PyQt5.QtTest import QTest +elif PYSIDE2: + from PySide2.QtTest import QTest elif PYQT4: from PyQt4.QtTest import QTest as OldQTest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtWebEngineWidgets.py new/QtPy-1.3.1/qtpy/QtWebEngineWidgets.py --- old/QtPy-1.2.1/qtpy/QtWebEngineWidgets.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtWebEngineWidgets.py 2017-05-11 17:36:04.000000000 +0200 @@ -10,7 +10,7 @@ Provides QtWebEngineWidgets classes and functions. """ -from . import PYQT5, PYQT4, PYSIDE, PythonQtError +from . import PYQT5,PYSIDE2, PYQT4, PYSIDE, PythonQtError # To test if we are using WebEngine or WebKit @@ -27,6 +27,18 @@ from PyQt5.QtWebKitWidgets import QWebView as QWebEngineView from PyQt5.QtWebKit import QWebSettings as QWebEngineSettings WEBENGINE = False +elif PYSIDE2: + try: + from PySide2.QtWebEngineWidgets import QWebEnginePage + from PySide2.QtWebEngineWidgets import QWebEngineView + # Current PySide2 wheels seem to be missing this. + # from PySide2.QtWebEngineWidgets import QWebEngineSettings + except ImportError: + from PySide2.QtWebKitWidgets import QWebPage as QWebEnginePage + from PySide2.QtWebKitWidgets import QWebView as QWebEngineView + # Current PySide2 wheels seem to be missing this. + # from PySide2.QtWebKit import QWebSettings as QWebEngineSettings + WEBENGINE = False elif PYQT4: from PyQt4.QtWebKit import QWebPage as QWebEnginePage from PyQt4.QtWebKit import QWebView as QWebEngineView diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/QtWidgets.py new/QtPy-1.3.1/qtpy/QtWidgets.py --- old/QtPy-1.2.1/qtpy/QtWidgets.py 2017-01-02 23:05:09.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/QtWidgets.py 2017-05-11 17:36:04.000000000 +0200 @@ -13,36 +13,46 @@ were the ``PyQt5.QtWidgets`` module. """ -from . import PYQT5, PYQT4, PYSIDE, PythonQtError +from . import PYQT5, PYSIDE2, PYQT4, PYSIDE, PythonQtError from ._patch.qcombobox import patch_qcombobox from ._patch.qheaderview import introduce_renamed_methods_qheaderview if PYQT5: from PyQt5.QtWidgets import * +elif PYSIDE2: + from PySide2.QtWidgets import * elif PYQT4: from PyQt4.QtGui import * QStyleOptionViewItem = QStyleOptionViewItemV4 del QStyleOptionViewItemV4 # These objects belong to QtGui + try: + # Older versions of PyQt4 do not provide these + del (QGlyphRun, + QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2, QMatrix3x3, + QMatrix3x4, QMatrix4x2, QMatrix4x3, QMatrix4x4, + QQuaternion, QRadialGradient, QRawFont, QRegExpValidator, + QStaticText, QTouchEvent, QVector2D, QVector3D, QVector4D, + qFuzzyCompare) + except NameError: + pass del (QAbstractTextDocumentLayout, QActionEvent, QBitmap, QBrush, QClipboard, QCloseEvent, QColor, QConicalGradient, QContextMenuEvent, QCursor, QDesktopServices, QDoubleValidator, QDrag, QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent, QDropEvent, QFileOpenEvent, QFocusEvent, QFont, QFontDatabase, QFontInfo, QFontMetrics, - QFontMetricsF, QGlyphRun, QGradient, QHelpEvent, QHideEvent, + QFontMetricsF, QGradient, QHelpEvent, QHideEvent, QHoverEvent, QIcon, QIconDragEvent, QIconEngine, QImage, QImageIOHandler, QImageReader, QImageWriter, QInputEvent, QInputMethodEvent, QKeyEvent, QKeySequence, QLinearGradient, - QMatrix2x2, QMatrix2x3, QMatrix2x4, QMatrix3x2, QMatrix3x3, - QMatrix3x4, QMatrix4x2, QMatrix4x3, QMatrix4x4, QMouseEvent, - QMoveEvent, QMovie, QPaintDevice, QPaintEngine, QPaintEngineState, - QPaintEvent, QPainter, QPainterPath, QPainterPathStroker, QPalette, - QPen, QPicture, QPictureIO, QPixmap, QPixmapCache, QPolygon, - QPolygonF, QQuaternion, QRadialGradient, QRawFont, QRegExpValidator, + QMouseEvent, QMoveEvent, QMovie, QPaintDevice, QPaintEngine, + QPaintEngineState, QPaintEvent, QPainter, QPainterPath, + QPainterPathStroker, QPalette, QPen, QPicture, QPictureIO, QPixmap, + QPixmapCache, QPolygon, QPolygonF, QRegion, QResizeEvent, QSessionManager, QShortcutEvent, QShowEvent, - QStandardItem, QStandardItemModel, QStaticText, QStatusTipEvent, + QStandardItem, QStandardItemModel, QStatusTipEvent, QSyntaxHighlighter, QTabletEvent, QTextBlock, QTextBlockFormat, QTextBlockGroup, QTextBlockUserData, QTextCharFormat, QTextCursor, QTextDocument, QTextDocumentFragment, QTextDocumentWriter, @@ -50,9 +60,9 @@ QTextImageFormat, QTextInlineObject, QTextItem, QTextLayout, QTextLength, QTextLine, QTextList, QTextListFormat, QTextObject, QTextObjectInterface, QTextOption, QTextTable, QTextTableCell, - QTextTableCellFormat, QTextTableFormat, QTouchEvent, QTransform, - QValidator, QVector2D, QVector3D, QVector4D, QWhatsThisClickedEvent, - QWheelEvent, QWindowStateChangeEvent, qAlpha, qBlue, qFuzzyCompare, + QTextTableCellFormat, QTextTableFormat, QTransform, + QValidator, QWhatsThisClickedEvent, + QWheelEvent, QWindowStateChangeEvent, qAlpha, qBlue, qGray, qGreen, qIsGray, qRed, qRgb, qRgba, QIntValidator, QStringListModel) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/__init__.py new/QtPy-1.3.1/qtpy/__init__.py --- old/QtPy-1.2.1/qtpy/__init__.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/__init__.py 2017-05-11 17:36:04.000000000 +0200 @@ -26,6 +26,17 @@ >>> print(QtWidgets.QWidget) +PySide2 +====== + +Set the QT_API environment variable to 'pyside2' before importing other +packages:: + + >>> import os + >>> os.environ['QT_API'] = 'pyside2' + >>> from qtpy import QtGui, QtWidgets, QtCore + >>> print(QtWidgets.QWidget) + PyQt4 ===== @@ -55,25 +66,32 @@ # Version of QtPy from ._version import __version__ -#: Qt API environment variable name +# Qt API environment variable name QT_API = 'QT_API' -#: names of the expected PyQt5 api + +# Names of the expected PyQt5 api PYQT5_API = ['pyqt5'] -#: names of the expected PyQt4 api + +# Names of the expected PyQt4 api PYQT4_API = [ 'pyqt', # name used in IPython.qt 'pyqt4' # pyqode.qt original name ] -#: names of the expected PySide api + +# Names of the expected PySide api PYSIDE_API = ['pyside'] +# Names of the expected PySide2 api +PYSIDE2_API = ['pyside2'] + +# Setting a default value for QT_API os.environ.setdefault(QT_API, 'pyqt5') API = os.environ[QT_API].lower() -assert API in (PYQT5_API + PYQT4_API + PYSIDE_API) +assert API in (PYQT5_API + PYQT4_API + PYSIDE_API + PYSIDE2_API) is_old_pyqt = is_pyqt46 = False PYQT5 = True -PYQT4 = PYSIDE = False +PYQT4 = PYSIDE = PYSIDE2 = False class PythonQtError(Exception): @@ -87,6 +105,17 @@ from PyQt5.Qt import QT_VERSION_STR as QT_VERSION # analysis:ignore PYSIDE_VERSION = None except ImportError: + API = os.environ['QT_API'] = 'pyside2' + +if API in PYSIDE2_API: + try: + from PySide2 import __version__ as PYSIDE_VERSION # analysis:ignore + from PySide2.QtCore import __version__ as QT_VERSION # analysis:ignore + + PYQT_VERSION = None + PYQT5 = False + PYSIDE2 = True + except ImportError: API = os.environ['QT_API'] = 'pyqt' if API in PYQT4_API: @@ -119,13 +148,14 @@ from PySide import __version__ as PYSIDE_VERSION # analysis:ignore from PySide.QtCore import __version__ as QT_VERSION # analysis:ignore PYQT_VERSION = None - PYQT5 = False + PYQT5 = PYSIDE2 = False PYSIDE = True except ImportError: raise PythonQtError('No Qt bindings could be found') API_NAME = {'pyqt5': 'PyQt5', 'pyqt': 'PyQt4', 'pyqt4': 'PyQt4', - 'pyside': 'PySide'}[API] + 'pyside': 'PySide', 'pyside2':'PySide2'}[API] + if PYQT4: import sip try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/_patch/qheaderview.py new/QtPy-1.3.1/qtpy/_patch/qheaderview.py --- old/QtPy-1.2.1/qtpy/_patch/qheaderview.py 2017-01-02 22:36:20.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/_patch/qheaderview.py 2017-08-21 18:38:49.000000000 +0200 @@ -4,6 +4,7 @@ # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) +import warnings def introduce_renamed_methods_qheaderview(QHeaderView): @@ -15,8 +16,9 @@ return _isClickable(self) QHeaderView.sectionsClickable = sectionsClickable def isClickable(self): - raise Exception('isClickable is only available in Qt4. Use ' - 'sectionsClickable instead.') + warnings.warn('isClickable is only available in Qt4. Use ' + 'sectionsClickable instead.', stacklevel=2) + return _isClickable(self) QHeaderView.isClickable = isClickable @@ -28,8 +30,9 @@ return _isMovable(self) QHeaderView.sectionsMovable = sectionsMovable def isMovable(self): - raise Exception('isMovable is only available in Qt4. Use ' - 'sectionsMovable instead.') + warnings.warn('isMovable is only available in Qt4. Use ' + 'sectionsMovable instead.', stacklevel=2) + return _isMovable(self) QHeaderView.isMovable = isMovable @@ -41,8 +44,9 @@ return _resizeMode(self, logicalIndex) QHeaderView.sectionResizeMode = sectionResizeMode def resizeMode(self, logicalIndex): - raise Exception('resizeMode is only available in Qt4. Use ' - 'sectionResizeMode instead.') + warnings.warn('resizeMode is only available in Qt4. Use ' + 'sectionResizeMode instead.', stacklevel=2) + return _resizeMode(self, logicalIndex) QHeaderView.resizeMode = resizeMode _setClickable = QHeaderView.setClickable @@ -53,8 +57,9 @@ return _setClickable(self, clickable) QHeaderView.setSectionsClickable = setSectionsClickable def setClickable(self, clickable): - raise Exception('setClickable is only available in Qt4. Use ' - 'setSectionsClickable instead.') + warnings.warn('setClickable is only available in Qt4. Use ' + 'setSectionsClickable instead.', stacklevel=2) + return _setClickable(self, clickable) QHeaderView.setClickable = setClickable @@ -66,8 +71,9 @@ return _setMovable(self, movable) QHeaderView.setSectionsMovable = setSectionsMovable def setMovable(self, movable): - raise Exception('setMovable is only available in Qt4. Use ' - 'setSectionsMovable instead.') + warnings.warn('setMovable is only available in Qt4. Use ' + 'setSectionsMovable instead.', stacklevel=2) + return _setMovable(self, movable) QHeaderView.setMovable = setMovable @@ -80,8 +86,9 @@ _setResizeMode(self, *args) QHeaderView.setSectionResizeMode = setSectionResizeMode def setResizeMode(self, *args): - raise Exception('setResizeMode is only available in Qt4. Use ' - 'setSectionResizeMode instead.') + warnings.warn('setResizeMode is only available in Qt4. Use ' + 'setSectionResizeMode instead.', stacklevel=2) + _setResizeMode(self, *args) QHeaderView.setResizeMode = setResizeMode diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/_version.py new/QtPy-1.3.1/qtpy/_version.py --- old/QtPy-1.2.1/qtpy/_version.py 2017-01-22 03:09:46.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/_version.py 2017-08-21 18:46:27.000000000 +0200 @@ -1,2 +1,2 @@ -version_info = (1, 2, 1) +version_info = (1, 3, 1) __version__ = '.'.join(map(str, version_info)) Binary files old/QtPy-1.2.1/qtpy/tests/__pycache__/conftest.cpython-35.pyc and new/QtPy-1.3.1/qtpy/tests/__pycache__/conftest.cpython-35.pyc differ Binary files old/QtPy-1.2.1/qtpy/tests/__pycache__/test_main.cpython-35-PYTEST.pyc and new/QtPy-1.3.1/qtpy/tests/__pycache__/test_main.cpython-35-PYTEST.pyc differ Binary files old/QtPy-1.2.1/qtpy/tests/__pycache__/test_patch_qcombobox.cpython-35-PYTEST.pyc and new/QtPy-1.3.1/qtpy/tests/__pycache__/test_patch_qcombobox.cpython-35-PYTEST.pyc differ Binary files old/QtPy-1.2.1/qtpy/tests/__pycache__/test_qtmultimedia.cpython-35-PYTEST.pyc and new/QtPy-1.3.1/qtpy/tests/__pycache__/test_qtmultimedia.cpython-35-PYTEST.pyc differ Binary files old/QtPy-1.2.1/qtpy/tests/__pycache__/test_uic.cpython-35-PYTEST.pyc and new/QtPy-1.3.1/qtpy/tests/__pycache__/test_uic.cpython-35-PYTEST.pyc differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/conftest.py new/QtPy-1.3.1/qtpy/tests/conftest.py --- old/QtPy-1.2.1/qtpy/tests/conftest.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/conftest.py 2017-05-11 17:36:04.000000000 +0200 @@ -55,5 +55,17 @@ versions += 'unknown version' versions += os.linesep + versions += 'PySide2: ' + + try: + import PySide2 + from PySide2 import QtCore + versions += "PySide: {0} - Qt: {1}".format(PySide2.__version__, QtCore.__version__) + except ImportError: + versions += 'not installed' + except AttributeError: + versions += 'unknown version' + + versions += os.linesep return versions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_main.py new/QtPy-1.3.1/qtpy/tests/test_main.py --- old/QtPy-1.2.1/qtpy/tests/test_main.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_main.py 2017-05-11 17:36:04.000000000 +0200 @@ -13,6 +13,15 @@ assert QtWidgets.QWidget is PySide.QtGui.QWidget assert QtWebEngineWidgets.QWebEnginePage is PySide.QtWebKit.QWebPage +def assert_pyside2(): + """ + Make sure that we are using PySide + """ + import PySide2 + assert QtCore.QEvent is PySide2.QtCore.QEvent + assert QtGui.QPainter is PySide2.QtGui.QPainter + assert QtWidgets.QWidget is PySide2.QtWidgets.QWidget + assert QtWebEngineWidgets.QWebEnginePage is PySide2.QtWebEngineWidgets.QWebEnginePage def assert_pyqt4(): """ @@ -52,6 +61,8 @@ assert_pyqt4() elif QT_API == 'pyqt5': assert_pyqt5() + elif QT_API == 'pyside2': + assert_pyside2() else: # If the tests are run locally, USE_QT_API and QT_API may not be # defined, but we still want to make sure qtpy is behaving sensibly. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_patch_qcombobox.py new/QtPy-1.3.1/qtpy/tests/test_patch_qcombobox.py --- old/QtPy-1.2.1/qtpy/tests/test_patch_qcombobox.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_patch_qcombobox.py 2017-05-11 17:36:04.000000000 +0200 @@ -1,6 +1,12 @@ from __future__ import absolute_import -from qtpy import QtGui, QtWidgets +import sys + +import pytest +from qtpy import PYSIDE2, QtGui, QtWidgets + + +PY3 = sys.version[0] == "3" def get_qapp(icon_path=None): @@ -19,6 +25,7 @@ raise ValueError("Failing") +@pytest.mark.skipif(PY3 or PYSIDE2, reason="It segfaults in Python 3 and PYSIDE2") def test_patched_qcombobox(): """ In PySide, using Python objects as userData in QComboBox causes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_patch_qheaderview.py new/QtPy-1.3.1/qtpy/tests/test_patch_qheaderview.py --- old/QtPy-1.2.1/qtpy/tests/test_patch_qheaderview.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_patch_qheaderview.py 2017-08-21 18:38:49.000000000 +0200 @@ -1,12 +1,17 @@ from __future__ import absolute_import -from qtpy import PYSIDE, PYQT4 +import sys + +import pytest +from qtpy import PYSIDE, PYSIDE2, PYQT4 from qtpy.QtWidgets import QApplication from qtpy.QtWidgets import QHeaderView from qtpy.QtCore import Qt from qtpy.QtCore import QAbstractListModel -import pytest + +PY3 = sys.version[0] == "3" + def get_qapp(icon_path=None): qapp = QApplication.instance() @@ -14,6 +19,8 @@ qapp = QApplication(['']) return qapp + +@pytest.mark.skipif(PY3 or PYSIDE2, reason="It fails on Python 3 and PySide2") def test_patched_qheaderview(): """ This will test whether QHeaderView has the new methods introduced in Qt5. @@ -75,17 +82,17 @@ # test that the old methods in Qt4 raise exceptions if PYQT4 or PYSIDE: - with pytest.raises(Exception): + with pytest.warns(UserWarning): headerview.isClickable() - with pytest.raises(Exception): + with pytest.warns(UserWarning): headerview.isMovable() - with pytest.raises(Exception): + with pytest.warns(UserWarning): headerview.resizeMode(0) - with pytest.raises(Exception): + with pytest.warns(UserWarning): headerview.setClickable(True) - with pytest.raises(Exception): - headerview.setMovableClickable(True) - with pytest.raises(Exception): + with pytest.warns(UserWarning): + headerview.setMovable(True) + with pytest.warns(UserWarning): headerview.setResizeMode(0, QHeaderView.Interactive) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qdesktopservice_split.py new/QtPy-1.3.1/qtpy/tests/test_qdesktopservice_split.py --- old/QtPy-1.2.1/qtpy/tests/test_qdesktopservice_split.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qdesktopservice_split.py 2017-05-11 17:36:04.000000000 +0200 @@ -0,0 +1,28 @@ +from __future__ import absolute_import + +import pytest +from qtpy import PYSIDE2 + +"""Test QDesktopServices split in Qt5.""" + +@pytest.mark.skipif(PYSIDE2, reason="It fails on PySide2") +def test_qstandarpath(): + """Test the qtpy.QStandardPaths namespace""" + from qtpy.QtCore import QStandardPaths + + assert QStandardPaths.StandardLocation is not None + + # Attributes from QDesktopServices shouldn't be in QStandardPaths + with pytest.raises(AttributeError) as excinfo: + QStandardPaths.setUrlHandler + +@pytest.mark.skipif(PYSIDE2, reason="It fails on PySide2") +def test_qdesktopservice(): + """Test the qtpy.QDesktopServices namespace""" + from qtpy.QtGui import QDesktopServices + + assert QDesktopServices.setUrlHandler is not None + + # Attributes from QStandardPaths shouldn't be in QDesktopServices + with pytest.raises(AttributeError) as excinfo: + QDesktopServices.StandardLocation \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qtcore.py new/QtPy-1.3.1/qtpy/tests/test_qtcore.py --- old/QtPy-1.2.1/qtpy/tests/test_qtcore.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qtcore.py 2017-08-12 17:19:03.000000000 +0200 @@ -0,0 +1,10 @@ +from __future__ import absolute_import + +import pytest +from qtpy import QtCore + +"""Test QtCore.""" + +def test_qtmsghandler(): + """Test the qtpy.QtMsgHandler""" + assert QtCore.qInstallMessageHandler is not None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qtdesigner.py new/QtPy-1.3.1/qtpy/tests/test_qtdesigner.py --- old/QtPy-1.2.1/qtpy/tests/test_qtdesigner.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qtdesigner.py 2017-05-11 17:36:04.000000000 +0200 @@ -0,0 +1,28 @@ +from __future__ import absolute_import + +import pytest +from qtpy import PYSIDE2, PYSIDE + +@pytest.mark.skipif(PYSIDE2 or PYSIDE, reason="QtDesigner is not avalaible in PySide/PySide2") +def test_qtdesigner(): + from qtpy import QtDesigner + """Test the qtpy.QtDesigner namespace""" + assert QtDesigner.QAbstractExtensionFactory is not None + assert QtDesigner.QAbstractExtensionManager is not None + assert QtDesigner.QDesignerActionEditorInterface is not None + assert QtDesigner.QDesignerContainerExtension is not None + assert QtDesigner.QDesignerCustomWidgetCollectionInterface is not None + assert QtDesigner.QDesignerCustomWidgetInterface is not None + assert QtDesigner.QDesignerFormEditorInterface is not None + assert QtDesigner.QDesignerFormWindowCursorInterface is not None + assert QtDesigner.QDesignerFormWindowInterface is not None + assert QtDesigner.QDesignerFormWindowManagerInterface is not None + assert QtDesigner.QDesignerMemberSheetExtension is not None + assert QtDesigner.QDesignerObjectInspectorInterface is not None + assert QtDesigner.QDesignerPropertyEditorInterface is not None + assert QtDesigner.QDesignerPropertySheetExtension is not None + assert QtDesigner.QDesignerTaskMenuExtension is not None + assert QtDesigner.QDesignerWidgetBoxInterface is not None + assert QtDesigner.QExtensionFactory is not None + assert QtDesigner.QExtensionManager is not None + assert QtDesigner.QFormBuilder is not None \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qtmultimedia.py new/QtPy-1.3.1/qtpy/tests/test_qtmultimedia.py --- old/QtPy-1.2.1/qtpy/tests/test_qtmultimedia.py 2017-01-02 21:13:51.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qtmultimedia.py 2017-05-11 17:36:04.000000000 +0200 @@ -1,8 +1,10 @@ from __future__ import absolute_import -from qtpy import QtMultimedia +import pytest +from qtpy import PYSIDE2, QtMultimedia +@pytest.mark.skipif(PYSIDE2, reason="It fails on PySide2") def test_qtmultimedia(): """Test the qtpy.QtMultimedia namespace""" assert QtMultimedia.QAbstractVideoBuffer is not None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qtnetwork.py new/QtPy-1.3.1/qtpy/tests/test_qtnetwork.py --- old/QtPy-1.2.1/qtpy/tests/test_qtnetwork.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qtnetwork.py 2017-05-11 17:36:04.000000000 +0200 @@ -0,0 +1,42 @@ +from __future__ import absolute_import + +import pytest +from qtpy import PYSIDE, PYSIDE2, QtNetwork + + +@pytest.mark.skipif(PYSIDE2 or PYSIDE, reason="It fails on PySide/PySide2") +def test_qtnetwork(): + """Test the qtpy.QtNetwork namespace""" + assert QtNetwork.QAbstractNetworkCache is not None + assert QtNetwork.QNetworkCacheMetaData is not None + assert QtNetwork.QHttpMultiPart is not None + assert QtNetwork.QHttpPart is not None + assert QtNetwork.QNetworkAccessManager is not None + assert QtNetwork.QNetworkCookie is not None + assert QtNetwork.QNetworkCookieJar is not None + assert QtNetwork.QNetworkDiskCache is not None + assert QtNetwork.QNetworkReply is not None + assert QtNetwork.QNetworkRequest is not None + assert QtNetwork.QNetworkConfigurationManager is not None + assert QtNetwork.QNetworkConfiguration is not None + assert QtNetwork.QNetworkSession is not None + assert QtNetwork.QAuthenticator is not None + assert QtNetwork.QHostAddress is not None + assert QtNetwork.QHostInfo is not None + assert QtNetwork.QNetworkAddressEntry is not None + assert QtNetwork.QNetworkInterface is not None + assert QtNetwork.QNetworkProxy is not None + assert QtNetwork.QNetworkProxyFactory is not None + assert QtNetwork.QNetworkProxyQuery is not None + assert QtNetwork.QAbstractSocket is not None + assert QtNetwork.QLocalServer is not None + assert QtNetwork.QLocalSocket is not None + assert QtNetwork.QTcpServer is not None + assert QtNetwork.QTcpSocket is not None + assert QtNetwork.QUdpSocket is not None + assert QtNetwork.QSslCertificate is not None + assert QtNetwork.QSslCipher is not None + assert QtNetwork.QSslConfiguration is not None + assert QtNetwork.QSslError is not None + assert QtNetwork.QSslKey is not None + assert QtNetwork.QSslSocket is not None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qtprintsupport.py new/QtPy-1.3.1/qtpy/tests/test_qtprintsupport.py --- old/QtPy-1.2.1/qtpy/tests/test_qtprintsupport.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qtprintsupport.py 2017-05-11 17:36:04.000000000 +0200 @@ -0,0 +1,18 @@ +from __future__ import absolute_import + +import pytest +from qtpy import QtPrintSupport + + +def test_qtprintsupport(): + """Test the qtpy.QtPrintSupport namespace""" + assert QtPrintSupport.QAbstractPrintDialog is not None + assert QtPrintSupport.QPageSetupDialog is not None + assert QtPrintSupport.QPrintDialog is not None + assert QtPrintSupport.QPrintPreviewDialog is not None + assert QtPrintSupport.QPrintEngine is not None + assert QtPrintSupport.QPrinter is not None + assert QtPrintSupport.QPrinterInfo is not None + assert QtPrintSupport.QPrintPreviewWidget is not None + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qtsvg.py new/QtPy-1.3.1/qtpy/tests/test_qtsvg.py --- old/QtPy-1.2.1/qtpy/tests/test_qtsvg.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qtsvg.py 2017-05-11 17:36:04.000000000 +0200 @@ -0,0 +1,14 @@ +from __future__ import absolute_import + +import pytest +from qtpy import PYSIDE2 + +@pytest.mark.skipif(PYSIDE2, reason="It fails on PySide2") +def test_qtsvg(): + """Test the qtpy.QtSvg namespace""" + from qtpy import QtSvg + + assert QtSvg.QGraphicsSvgItem is not None + assert QtSvg.QSvgGenerator is not None + assert QtSvg.QSvgRenderer is not None + assert QtSvg.QSvgWidget is not None \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_qttest.py new/QtPy-1.3.1/qtpy/tests/test_qttest.py --- old/QtPy-1.2.1/qtpy/tests/test_qttest.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_qttest.py 2017-05-11 17:36:04.000000000 +0200 @@ -0,0 +1,9 @@ +from __future__ import absolute_import + +import pytest +from qtpy import QtTest + + +def test_qttest(): + """Test the qtpy.QtTest namespace""" + assert QtTest.QTest is not None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/tests/test_uic.py new/QtPy-1.3.1/qtpy/tests/test_uic.py --- old/QtPy-1.2.1/qtpy/tests/test_uic.py 2017-01-06 03:16:17.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/tests/test_uic.py 2017-08-12 17:19:03.000000000 +0200 @@ -2,7 +2,8 @@ import sys import contextlib -from qtpy import QtWidgets +import pytest +from qtpy import PYSIDE2, QtWidgets from qtpy.QtWidgets import QComboBox from qtpy import uic from qtpy.uic import loadUi @@ -69,6 +70,7 @@ assert isinstance(ui.comboBox, _QComboBoxSubclass) +@pytest.mark.skipif(PYSIDE2, reason="It fails on PySide2") def test_load_full_uic(): """Test that we load the full uic objects for PyQt5 and PyQt4.""" QT_API = os.environ.get('QT_API', '').lower() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.2.1/qtpy/uic.py new/QtPy-1.3.1/qtpy/uic.py --- old/QtPy-1.2.1/qtpy/uic.py 2017-01-06 03:16:17.000000000 +0100 +++ new/QtPy-1.3.1/qtpy/uic.py 2017-08-12 17:19:03.000000000 +0200 @@ -1,6 +1,6 @@ import os -from . import PYSIDE, PYQT4, PYQT5 +from . import PYSIDE, PYSIDE2, PYQT4, PYQT5 from .QtWidgets import QComboBox @@ -12,7 +12,7 @@ from PyQt4.uic import * -elif PYSIDE: +else: __all__ = ['loadUi'] @@ -78,8 +78,12 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. - from PySide.QtCore import QMetaObject - from PySide.QtUiTools import QUiLoader + if PYSIDE: + from PySide.QtCore import QMetaObject + from PySide.QtUiTools import QUiLoader + elif PYSIDE2: + from PySide2.QtCore import QMetaObject + from PySide2.QtUiTools import QUiLoader class UiLoader(QUiLoader): """