commit python-QtPy for openSUSE:Factory
Hello community, here is the log from the commit of package python-QtPy for openSUSE:Factory checked in at 2018-04-30 22:56:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-QtPy (Old) and /work/SRC/openSUSE:Factory/.python-QtPy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-QtPy" Mon Apr 30 22:56:35 2018 rev:3 rq:602303 version:1.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-QtPy/python-QtPy.changes 2017-08-29 11:47:45.269251682 +0200 +++ /work/SRC/openSUSE:Factory/.python-QtPy.new/python-QtPy.changes 2018-04-30 22:58:55.716483182 +0200 @@ -1,0 +2,32 @@ +Sat Apr 28 19:47:37 UTC 2018 - toddrme2178@gmail.com + +- Update to Version 1.4.1 + + New features + * Show a warning when QT_API is changed automatically by qtpy. + + Issues Closed + * Raise a warning if QT_API value is changed automatically + * On OSX qtpy applications are forcing discrete graphics + + Pull Requests Merged + * Add better compatibility with PySide2 + * Add a warning if API is changed automatically + * Avoid using PyQt5.Qt, which imports unneeded stuff and forces + discrete GPU on OSX +- Update to Version 1.4 (2018-03-11) + + New features + * Add support for QtHelp + * Add support for QtSql + * Use already imported bindings + + Issues Closed + * If one binding has already been imported, + then qtpy should just use it + * Add Wrapper for QtSql + * Methods missing from QStandardPaths when QT_API=pyqt4 + * Add Wrapper for QtHelp + + Pull Requests Merged + * Pin PyQt5 to 5.9.2 in CircleCI because 5.10 is generating segfaults + * If a Qt binding is already imported, then use it. + * Add QtSql wrapper (incl. test) + * Changes to QDesktop split + * Add QtHelp Wrapper + +------------------------------------------------------------------- Old: ---- QtPy-1.3.1.tar.gz New: ---- QtPy-1.4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-QtPy.spec ++++++ --- /var/tmp/diff_new_pack.JDwOgh/_old 2018-04-30 22:58:56.620450197 +0200 +++ /var/tmp/diff_new_pack.JDwOgh/_new 2018-04-30 22:58:56.640449468 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-QtPy # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-QtPy -Version: 1.3.1 +Version: 1.4.1 Release: 0 License: MIT Summary: Abstraction layer on top of Qt bindings ++++++ QtPy-1.3.1.tar.gz -> QtPy-1.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/CHANGELOG.md new/QtPy-1.4.1/CHANGELOG.md --- old/QtPy-1.3.1/CHANGELOG.md 2017-08-21 18:45:03.000000000 +0200 +++ new/QtPy-1.4.1/CHANGELOG.md 2018-04-28 19:05:26.000000000 +0200 @@ -1,5 +1,61 @@ # History of changes +## Version 1.4.1 (2018-04-28) + +### New features + +* Show a warning when QT_API is changed automatically by qtpy. + +### Issues Closed + +* [Issue 145](https://github.com/spyder-ide/qtpy/issues/145) - Raise a warning if QT_API value is changed automatically ([PR 146](https://github.com/spyder-ide/qtpy/pull/146)) +* [Issue 142](https://github.com/spyder-ide/qtpy/issues/142) - On OSX qtpy applications are forcing discrete graphics ([PR 143](https://github.com/spyder-ide/qtpy/pull/143)) + +In this release 2 issues were closed. + +### Pull Requests Merged + +* [PR 147](https://github.com/spyder-ide/qtpy/pull/147) - PR: Add better compatibility with PySide2 +* [PR 146](https://github.com/spyder-ide/qtpy/pull/146) - PR: Add a warning if API is changed automatically ([145](https://github.com/spyder-ide/qtpy/issues/145)) +* [PR 143](https://github.com/spyder-ide/qtpy/pull/143) - PR: Avoid using PyQt5.Qt, which imports unneeded stuff and forces discrete GPU on OSX ([142](https://github.com/spyder-ide/qtpy/issues/142)) + +In this release 3 pull requests were closed. + + +---- + + +## Version 1.4 (2018-03-11) + +### New features + +* Add support for QtHelp +* Add support for QtSql +* Use already imported bindings + +### Issues Closed + +* [Issue 138](https://github.com/spyder-ide/qtpy/issues/138) - If one binding has already been imported, then qtpy should just use it ([PR 139](https://github.com/spyder-ide/qtpy/pull/139)) +* [Issue 135](https://github.com/spyder-ide/qtpy/issues/135) - Add Wrapper for QtSql [feature request] ([PR 136](https://github.com/spyder-ide/qtpy/pull/136)) +* [Issue 131](https://github.com/spyder-ide/qtpy/issues/131) - Methods missing from QStandardPaths when QT_API=pyqt4 +* [Issue 127](https://github.com/spyder-ide/qtpy/issues/127) - Add Wrapper for QtHelp [feature request] ([PR 128](https://github.com/spyder-ide/qtpy/pull/128)) + +In this release 4 issues were closed. + +### Pull Requests Merged + +* [PR 140](https://github.com/spyder-ide/qtpy/pull/140) - PR: Pin PyQt5 to 5.9.2 in CircleCI because 5.10 is generating segfaults +* [PR 139](https://github.com/spyder-ide/qtpy/pull/139) - PR: If a Qt binding is already imported, then use it. ([138](https://github.com/spyder-ide/qtpy/issues/138)) +* [PR 136](https://github.com/spyder-ide/qtpy/pull/136) - PR: Add QtSql wrapper (incl. test) ([135](https://github.com/spyder-ide/qtpy/issues/135)) +* [PR 132](https://github.com/spyder-ide/qtpy/pull/132) - PR: Changes to QDesktop split +* [PR 128](https://github.com/spyder-ide/qtpy/pull/128) - PR: Add QtHelp Wrapper ([127](https://github.com/spyder-ide/qtpy/issues/127)) + +In this release 5 pull requests were closed. + + +---- + + ## Version 1.3.1 (2017-08-21) ### Bugs fixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/PKG-INFO new/QtPy-1.4.1/PKG-INFO --- old/QtPy-1.3.1/PKG-INFO 2017-08-21 18:47:29.000000000 +0200 +++ new/QtPy-1.4.1/PKG-INFO 2018-04-28 19:09:04.000000000 +0200 @@ -1,10 +1,12 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: QtPy -Version: 1.3.1 +Version: 1.4.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 +Author: Colin Duquesnoy, The Spyder Development Team Author-email: goanpeca@gmail.com +Maintainer: Gonzalo Peña-Castellanos +Maintainer-email: goanpeca@gmail.com License: MIT Description: .. image:: https://img.shields.io/pypi/v/QtPy.svg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/QtPy.egg-info/PKG-INFO new/QtPy-1.4.1/QtPy.egg-info/PKG-INFO --- old/QtPy-1.3.1/QtPy.egg-info/PKG-INFO 2017-08-21 18:47:28.000000000 +0200 +++ new/QtPy-1.4.1/QtPy.egg-info/PKG-INFO 2018-04-28 19:09:04.000000000 +0200 @@ -1,10 +1,12 @@ -Metadata-Version: 1.1 +Metadata-Version: 1.2 Name: QtPy -Version: 1.3.1 +Version: 1.4.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 +Author: Colin Duquesnoy, The Spyder Development Team Author-email: goanpeca@gmail.com +Maintainer: Gonzalo Peña-Castellanos +Maintainer-email: goanpeca@gmail.com License: MIT Description: .. image:: https://img.shields.io/pypi/v/QtPy.svg diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/QtPy.egg-info/SOURCES.txt new/QtPy-1.4.1/QtPy.egg-info/SOURCES.txt --- old/QtPy-1.3.1/QtPy.egg-info/SOURCES.txt 2017-08-21 18:47:29.000000000 +0200 +++ new/QtPy-1.4.1/QtPy.egg-info/SOURCES.txt 2018-04-28 19:09:04.000000000 +0200 @@ -12,10 +12,12 @@ qtpy/QtCore.py qtpy/QtDesigner.py qtpy/QtGui.py +qtpy/QtHelp.py qtpy/QtMultimedia.py qtpy/QtNetwork.py qtpy/QtOpenGL.py qtpy/QtPrintSupport.py +qtpy/QtSql.py qtpy/QtSvg.py qtpy/QtTest.py qtpy/QtWebEngineWidgets.py @@ -39,9 +41,11 @@ qtpy/tests/test_qdesktopservice_split.py qtpy/tests/test_qtcore.py qtpy/tests/test_qtdesigner.py +qtpy/tests/test_qthelp.py qtpy/tests/test_qtmultimedia.py qtpy/tests/test_qtnetwork.py qtpy/tests/test_qtprintsupport.py +qtpy/tests/test_qtsql.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.3.1/README.md new/QtPy-1.4.1/README.md --- old/QtPy-1.3.1/README.md 2017-08-12 17:45:55.000000000 +0200 +++ new/QtPy-1.4.1/README.md 2018-03-11 22:29:19.000000000 +0100 @@ -6,6 +6,8 @@ [![license](https://img.shields.io/pypi/l/qtpy.svg)](./LICENSE) [![pypi version](https://img.shields.io/pypi/v/qtpy.svg)](https://pypi.python.org/pypi/qtpy) [![Join the chat at https://gitter.im/spyder-ide/public](https://badges.gitter.im/spyder-ide/spyder.svg)](https://gitter.im/spyder-ide/public) +[![OpenCollective Backers](https://opencollective.com/spyder/backers/badge.svg?color=blue)](#backers) +[![OpenCollective Sponsors](https://opencollective.com/spyder/sponsors/badge.svg?color=blue)](#sponsors) ## Build status [![Build status](https://ci.appveyor.com/api/projects/status/62y6i02vhn4hefg0/branch/master?svg=true)](https://ci.appveyor.com/project/spyder-ide/qtpy/branch/master) @@ -13,6 +15,27 @@ [![Coverage Status](https://coveralls.io/repos/github/spyder-ide/qtpy/badge.svg?branch=master)](https://coveralls.io/github/spyder-ide/qtpy?branch=master) [![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) +---- + +## Important Announcement: Spyder is unfunded! + +Since mid November/2017, [Anaconda, Inc](https://www.anaconda.com/) has +stopped funding Spyder development, after doing it for the past 18 +months. Because of that, development will focus from now on maintaining +Spyder 3 at a much slower pace than before. + +If you want to contribute to maintain Spyder, please consider donating at + +https://opencollective.com/spyder + +We appreciate all the help you can provide us and can't thank you enough for +supporting the work of Spyder devs and Spyder development. + +If you want to know more about this, please read this +[page](https://github.com/spyder-ide/spyder/wiki/Anaconda-stopped-funding-Spyder). + +---- + ## Description **QtPy** is a small abstraction layer that lets you @@ -68,3 +91,20 @@ ```bash conda install qtpy ``` + +## Contributing + +Everyone is welcome to contribute! + +## Backers + +Support us with a monthly donation and help us continue our activities. + +[![Backers](https://opencollective.com/spyder/backers.svg)](https://opencollective.com/spyder#support) + + +## Sponsors + +Become a sponsor to get your logo on our README on Github. + +[![Sponsors](https://opencollective.com/spyder/sponsors.svg)](https://opencollective.com/spyder#support) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/QtCore.py new/QtPy-1.4.1/qtpy/QtCore.py --- old/QtPy-1.3.1/qtpy/QtCore.py 2017-08-12 17:19:03.000000000 +0200 +++ new/QtPy-1.4.1/qtpy/QtCore.py 2018-04-28 19:01:30.000000000 +0200 @@ -24,6 +24,8 @@ del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR elif PYSIDE2: from PySide2.QtCore import * + from PySide2.QtGui import QStringListModel + elif PYQT4: from PyQt4.QtCore import * # Those are things we inherited from Spyder that fix crazy crashes under @@ -58,6 +60,7 @@ HomeLocation = _QDesktopServices.HomeLocation DataLocation = _QDesktopServices.DataLocation CacheLocation = _QDesktopServices.CacheLocation + writableLocation = _QDesktopServices.storageLocation # Those are imported from `import *` del pyqtSignal, pyqtSlot, pyqtProperty, QT_VERSION_STR, qInstallMsgHandler @@ -88,6 +91,7 @@ HomeLocation = _QDesktopServices.HomeLocation DataLocation = _QDesktopServices.DataLocation CacheLocation = _QDesktopServices.CacheLocation + writableLocation = _QDesktopServices.storageLocation import PySide.QtCore __version__ = PySide.QtCore.__version__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/QtGui.py new/QtPy-1.4.1/qtpy/QtGui.py --- old/QtPy-1.3.1/qtpy/QtGui.py 2017-05-11 17:36:04.000000000 +0200 +++ new/QtPy-1.4.1/qtpy/QtGui.py 2018-03-11 22:29:19.000000000 +0100 @@ -12,6 +12,7 @@ exposed here. Therefore, you need to treat/use this package as if it were the ``PyQt5.QtGui`` module. """ +import warnings from . import PYQT5, PYQT4, PYSIDE, PYSIDE2, PythonQtError @@ -75,10 +76,21 @@ from PyQt4.QtGui import QDesktopServices as _QDesktopServices class QDesktopServices(): - openUrl = _QDesktopServices.openUrl - setUrlHandler = _QDesktopServices.setUrlHandler - unsetUrlHandler = _QDesktopServices.unsetUrlHandler - + openUrl = _QDesktopServices.openUrl + setUrlHandler = _QDesktopServices.setUrlHandler + unsetUrlHandler = _QDesktopServices.unsetUrlHandler + + def __getattr__(self, name): + attr = getattr(_QDesktopServices, name) + + new_name = name + if name == 'storageLocation': + new_name = 'writableLocation' + warnings.warn(("Warning QDesktopServices.{} is deprecated in Qt5" + "we recommend you use QDesktopServices.{} instead").format(name, new_name), + DeprecationWarning) + return attr + QDesktopServices = QDesktopServices() elif PYSIDE: from PySide.QtGui import (QAbstractTextDocumentLayout, QActionEvent, QBitmap, @@ -126,8 +138,20 @@ from PySide.QtGui import QDesktopServices as _QDesktopServices class QDesktopServices(): - openUrl = _QDesktopServices.openUrl - setUrlHandler = _QDesktopServices.setUrlHandler - unsetUrlHandler = _QDesktopServices.unsetUrlHandler + openUrl = _QDesktopServices.openUrl + setUrlHandler = _QDesktopServices.setUrlHandler + unsetUrlHandler = _QDesktopServices.unsetUrlHandler + + def __getattr__(self, name): + attr = getattr(_QDesktopServices, name) + + new_name = name + if name == 'storageLocation': + new_name = 'writableLocation' + warnings.warn(("Warning QDesktopServices.{} is deprecated in Qt5" + "we recommend you use QDesktopServices.{} instead").format(name, new_name), + DeprecationWarning) + return attr + QDesktopServices = QDesktopServices() else: raise PythonQtError('No Qt bindings could be found') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/QtHelp.py new/QtPy-1.4.1/qtpy/QtHelp.py --- old/QtPy-1.3.1/qtpy/QtHelp.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.4.1/qtpy/QtHelp.py 2018-03-11 22:30:58.000000000 +0100 @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# +# Copyright © 2009- The Spyder Development Team +# +# Licensed under the terms of the MIT License +# (see LICENSE.txt for details) + +"""QtHelp Wrapper.""" + +import warnings + +from . import PYQT5 +from . import PYQT4 +from . import PYSIDE +from . import PYSIDE2 +from . import PythonQtWarning + +if PYQT5: + from PyQt5.QtHelp import * +elif PYSIDE2: + # Current wheels don't have this module + # from PySide2.QtHelp + warnings.warn("QtHelp binding is missing in PySide2", PythonQtWarning) +elif PYQT4: + from PyQt4.QtHelp import * +elif PYSIDE: + from PySide.QtHelp import * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/QtMultimedia.py new/QtPy-1.4.1/qtpy/QtMultimedia.py --- old/QtPy-1.3.1/qtpy/QtMultimedia.py 2017-05-11 17:36:04.000000000 +0200 +++ new/QtPy-1.4.1/qtpy/QtMultimedia.py 2018-03-11 22:30:58.000000000 +0100 @@ -1,15 +1,17 @@ +import warnings + from . import PYQT5 from . import PYQT4 from . import PYSIDE from . import PYSIDE2 - +from . import PythonQtWarning if PYQT5: from PyQt5.QtMultimedia import * elif PYSIDE2: # Current wheels don't have this module # from PySide2.QtMultimedia import * - pass + warnings.warn("QtMultimedia binding is missing in PySide2", PythonQtWarning) elif PYQT4: from PyQt4.QtMultimedia import * from PyQt4.QtGui import QSound diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/QtSql.py new/QtPy-1.4.1/qtpy/QtSql.py --- old/QtPy-1.3.1/qtpy/QtSql.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.4.1/qtpy/QtSql.py 2018-03-11 22:29:19.000000000 +0100 @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# ----------------------------------------------------------------------------- +# Copyright © 2009- The Spyder Development Team +# +# Licensed under the terms of the MIT License +# (see LICENSE.txt for details) +# ----------------------------------------------------------------------------- +"""Provides QtSql classes and functions.""" + +# Local imports +from . import PYQT5, PYSIDE2, PYQT4, PYSIDE, PythonQtError + +if PYQT5: + from PyQt5.QtSql import * +elif PYSIDE2: + from PySide2.QtSql import * +elif PYQT4: + from PyQt4.QtSql import * +elif PYSIDE: + from PySide.QtSql import * +else: + raise PythonQtError('No Qt bindings could be found') + +del PYQT4, PYQT5, PYSIDE, PYSIDE2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/__init__.py new/QtPy-1.4.1/qtpy/__init__.py --- old/QtPy-1.3.1/qtpy/__init__.py 2017-05-11 17:36:04.000000000 +0200 +++ new/QtPy-1.4.1/qtpy/__init__.py 2018-04-28 19:01:30.000000000 +0200 @@ -10,12 +10,13 @@ **QtPy** is a shim over the various Python Qt bindings. It is used to write Qt binding indenpendent libraries or applications. -The shim will automatically select the first available API (PyQt5, PyQt4 and -finally PySide). +If one of the APIs has already been imported, then it will be used. -You can force the use of one specific bindings (e.g. if your application is -using one specific bindings and you need to use library that use QtPy) by -setting up the ``QT_API`` environment variable. +Otherwise, the shim will automatically select the first available API (PyQt5, +PySide2, PyQt4 and finally PySide); in that case, you can force the use of one +specific bindings (e.g. if your application is using one specific bindings and +you need to use library that use QtPy) by setting up the ``QT_API`` environment +variable. PyQt5 ===== @@ -62,6 +63,8 @@ """ import os +import sys +import warnings # Version of QtPy from ._version import __version__ @@ -86,7 +89,9 @@ # Setting a default value for QT_API os.environ.setdefault(QT_API, 'pyqt5') + API = os.environ[QT_API].lower() +initial_api = API assert API in (PYQT5_API + PYQT4_API + PYSIDE_API + PYSIDE2_API) is_old_pyqt = is_pyqt46 = False @@ -98,11 +103,24 @@ """Error raise if no bindings could be selected""" pass +class PythonQtWarning(Warning): + """Warning if some features are not implemented in a binding.""" + pass + +if 'PyQt5' in sys.modules: + API = 'pyqt5' +elif 'PySide2' in sys.modules: + API = 'pyside2' +elif 'PyQt4' in sys.modules: + API = 'pyqt4' +elif 'PySide' in sys.modules: + API = 'pyside' + if API in PYQT5_API: try: - from PyQt5.Qt import PYQT_VERSION_STR as PYQT_VERSION # analysis:ignore - from PyQt5.Qt import QT_VERSION_STR as QT_VERSION # analysis:ignore + from PyQt5.QtCore import PYQT_VERSION_STR as PYQT_VERSION # analysis:ignore + from PyQt5.QtCore import QT_VERSION_STR as QT_VERSION # analysis:ignore PYSIDE_VERSION = None except ImportError: API = os.environ['QT_API'] = 'pyside2' @@ -153,6 +171,12 @@ except ImportError: raise PythonQtError('No Qt bindings could be found') +# If a correct API name is passed to QT_API and it could not be found, +# switches to another and informs through the warning +if API != initial_api: + warnings.warn('Selected binding "{}" could not be found, ' + 'using "{}"'.format(initial_api, API), RuntimeWarning) + API_NAME = {'pyqt5': 'PyQt5', 'pyqt': 'PyQt4', 'pyqt4': 'PyQt4', 'pyside': 'PySide', 'pyside2':'PySide2'}[API] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/_version.py new/QtPy-1.4.1/qtpy/_version.py --- old/QtPy-1.3.1/qtpy/_version.py 2017-08-21 18:46:27.000000000 +0200 +++ new/QtPy-1.4.1/qtpy/_version.py 2018-04-28 19:07:19.000000000 +0200 @@ -1,2 +1,2 @@ -version_info = (1, 3, 1) +version_info = (1, 4, 1) __version__ = '.'.join(map(str, version_info)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/tests/test_qdesktopservice_split.py new/QtPy-1.4.1/qtpy/tests/test_qdesktopservice_split.py --- old/QtPy-1.3.1/qtpy/tests/test_qdesktopservice_split.py 2017-05-11 17:36:04.000000000 +0200 +++ new/QtPy-1.4.1/qtpy/tests/test_qdesktopservice_split.py 2018-03-11 22:29:19.000000000 +0100 @@ -1,7 +1,8 @@ from __future__ import absolute_import import pytest -from qtpy import PYSIDE2 +import warnings +from qtpy import PYQT4, PYSIDE, PYSIDE2 """Test QDesktopServices split in Qt5.""" @@ -23,6 +24,18 @@ 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 + +@pytest.mark.skipif(not (PYQT4 or PYSIDE), reason="Warning is only raised in old bindings") +def test_qdesktopservice_qt4_pyside(): + from qtpy.QtGui import QDesktopServices + # Attributes from QStandardPaths should raise a warning when imported + # from QDesktopServices + with warnings.catch_warnings(record=True) as w: + # Cause all warnings to always be triggered. + warnings.simplefilter("always") + # Try to import QtHelp. + QDesktopServices.StandardLocation + + assert len(w) == 1 + assert issubclass(w[-1].category, DeprecationWarning) + assert "deprecated" in str(w[-1].message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/tests/test_qthelp.py new/QtPy-1.4.1/qtpy/tests/test_qthelp.py --- old/QtPy-1.3.1/qtpy/tests/test_qthelp.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.4.1/qtpy/tests/test_qthelp.py 2018-03-11 22:30:58.000000000 +0100 @@ -0,0 +1,38 @@ +"""Test for QtHelp namespace.""" + +from __future__ import absolute_import +import warnings + +import pytest +from qtpy import PYSIDE2, PythonQtWarning + + +@pytest.mark.skipif(PYSIDE2, reason="QtHelp binding is missing in PySide2") +def test_qthelp(): + """Test the qtpy.QtHelp namespace.""" + from qtpy import QtHelp + + assert QtHelp.QHelpContentItem is not None + assert QtHelp.QHelpContentModel is not None + assert QtHelp.QHelpContentWidget is not None + assert QtHelp.QHelpEngine is not None + assert QtHelp.QHelpEngineCore is not None + assert QtHelp.QHelpIndexModel is not None + assert QtHelp.QHelpIndexWidget is not None + assert QtHelp.QHelpSearchEngine is not None + assert QtHelp.QHelpSearchQuery is not None + assert QtHelp.QHelpSearchQueryWidget is not None + assert QtHelp.QHelpSearchResultWidget is not None + + +@pytest.mark.skipif(not PYSIDE2, reason="Only runs in not implemented bindings") +def test_qthelp_not_implemented(): + with warnings.catch_warnings(record=True) as w: + # Cause all warnings to always be triggered. + warnings.simplefilter("always") + # Try to import QtHelp. + from qtpy import QtHelp + + assert len(w) == 1 + assert issubclass(w[-1].category, PythonQtWarning) + assert "missing" in str(w[-1].message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/tests/test_qtmultimedia.py new/QtPy-1.4.1/qtpy/tests/test_qtmultimedia.py --- old/QtPy-1.3.1/qtpy/tests/test_qtmultimedia.py 2017-05-11 17:36:04.000000000 +0200 +++ new/QtPy-1.4.1/qtpy/tests/test_qtmultimedia.py 2018-03-11 22:30:58.000000000 +0100 @@ -1,14 +1,30 @@ from __future__ import absolute_import import pytest -from qtpy import PYSIDE2, QtMultimedia +import warnings +from qtpy import PYSIDE2, PythonQtWarning @pytest.mark.skipif(PYSIDE2, reason="It fails on PySide2") def test_qtmultimedia(): """Test the qtpy.QtMultimedia namespace""" + from qtpy import QtMultimedia + assert QtMultimedia.QAbstractVideoBuffer is not None assert QtMultimedia.QAudio is not None assert QtMultimedia.QAudioDeviceInfo is not None assert QtMultimedia.QAudioInput is not None assert QtMultimedia.QSound is not None + + +@pytest.mark.skipif(not PYSIDE2, reason="Only runs in not implemented bindings") +def test_qtmultimedia_not_implemented(): + with warnings.catch_warnings(record=True) as w: + # Cause all warnings to always be triggered. + warnings.simplefilter("always") + # Try to import QtMultimedia. + from qtpy import QtMultimedia + + assert len(w) == 1 + assert issubclass(w[-1].category, PythonQtWarning) + assert "missing" in str(w[-1].message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/qtpy/tests/test_qtsql.py new/QtPy-1.4.1/qtpy/tests/test_qtsql.py --- old/QtPy-1.3.1/qtpy/tests/test_qtsql.py 1970-01-01 01:00:00.000000000 +0100 +++ new/QtPy-1.4.1/qtpy/tests/test_qtsql.py 2018-03-11 22:29:19.000000000 +0100 @@ -0,0 +1,24 @@ +from __future__ import absolute_import + +import pytest +from qtpy import QtSql + +def test_qtsql(): + """Test the qtpy.QtSql namespace""" + assert QtSql.QSqlDatabase is not None + assert QtSql.QSqlDriverCreatorBase is not None + assert QtSql.QSqlDriver is not None + assert QtSql.QSqlError is not None + assert QtSql.QSqlField is not None + assert QtSql.QSqlIndex is not None + assert QtSql.QSqlQuery is not None + assert QtSql.QSqlRecord is not None + assert QtSql.QSqlResult is not None + assert QtSql.QSqlQueryModel is not None + assert QtSql.QSqlRelationalDelegate is not None + assert QtSql.QSqlRelation is not None + assert QtSql.QSqlRelationalTableModel is not None + assert QtSql.QSqlTableModel is not None + + # Following modules are not (yet) part of any wrapper: + # QSqlDriverCreator, QSqlDriverPlugin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QtPy-1.3.1/setup.cfg new/QtPy-1.4.1/setup.cfg --- old/QtPy-1.3.1/setup.cfg 2017-08-21 18:47:29.000000000 +0200 +++ new/QtPy-1.4.1/setup.cfg 2018-04-28 19:09:04.000000000 +0200 @@ -4,5 +4,4 @@ [egg_info] tag_build = tag_date = 0 -tag_svn_revision = 0
participants (1)
-
root@hilbert.suse.de