[Python-modules-commits] [python-qtpy] 01/04: Imported Upstream version 1.0.2

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Jun 5 21:19:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-qtpy.

commit 2facca40441781d9a25cbd384528ece6ef77c236
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Sun Jun 5 02:35:33 2016 +0100

    Imported Upstream version 1.0.2
---
 CHANGELOG.md               | 5 +++++
 RELEASE.md                 | 4 ++--
 qtpy/QtWebEngineWidgets.py | 9 ++++++++-
 qtpy/__init__.py           | 2 +-
 qtpy/_version.py           | 2 +-
 setup.py                   | 3 +--
 tests/tests.py             | 2 +-
 7 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index edee103..cc3781c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
 # History of changes
 
+## Version 1.0.2 (01/06/16)
+
+* Add a WEBENGINE constant to QtWebEngineWidgets, which is True if Qt 5 comes
+  with the WebEngine module and False otherwise.
+
 ## Version 1.0.1 (10/04/16)
 
 * Import QIntValidator in QtGui and remove it from QtWidgets (PR #19)
diff --git a/RELEASE.md b/RELEASE.md
index 196cb21..0aa7e98 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -1,9 +1,9 @@
 To release a new version of qtpy on PyPI:
 
-* Update CHANGELOG.md
-
 * git pull
 
+* Update CHANGELOG.md
+
 * Update `_version.py` (set release version, remove 'dev0')
 
 * git add and git commit
diff --git a/qtpy/QtWebEngineWidgets.py b/qtpy/QtWebEngineWidgets.py
index 5aee4bc..c1a6b77 100644
--- a/qtpy/QtWebEngineWidgets.py
+++ b/qtpy/QtWebEngineWidgets.py
@@ -19,6 +19,10 @@ from qtpy import PYSIDE_API
 from qtpy import PythonQtError
 
 
+# To test if we are using WebEngine or WebKit
+WEBENGINE = True
+
+
 if os.environ[QT_API] in PYQT5_API:
     try:
         from PyQt5.QtWebEngineWidgets import QWebEnginePage
@@ -27,14 +31,17 @@ if os.environ[QT_API] in PYQT5_API:
     except ImportError:
         from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
         from PyQt5.QtWebKitWidgets import QWebView as QWebEngineView
-        from PyQt5.QtWebKit import QWebSettings as QWebEngineSettings 
+        from PyQt5.QtWebKit import QWebSettings as QWebEngineSettings
+        WEBENGINE = False
 elif os.environ[QT_API] in PYQT4_API:
     from PyQt4.QtWebKit import QWebPage as QWebEnginePage
     from PyQt4.QtWebKit import QWebView as QWebEngineView
     from PyQt4.QtWebKit import QWebSettings as QWebEngineSettings
+    WEBENGINE = False
 elif os.environ[QT_API] in PYSIDE_API:
     from PySide.QtWebKit import QWebPage as QWebEnginePage
     from PySide.QtWebKit import QWebView as QWebEngineView
     from PySide.QtWebKit import QWebSettings as QWebEngineSettings
+    WEBENGINE = False
 else:
     raise PythonQtError('No Qt bindings could be found')
diff --git a/qtpy/__init__.py b/qtpy/__init__.py
index e9ad184..8ab8a20 100644
--- a/qtpy/__init__.py
+++ b/qtpy/__init__.py
@@ -116,7 +116,7 @@ if API in PYQT4_API:
         is_pyqt46 = __version__.startswith('4.6')
         import sip
         try:
-            API_NAME += (" (API v%d)" % sip.getapi('QString'))
+            API_NAME += (" (API v{0})".format(sip.getapi('QString')))
         except AttributeError:
             pass
 
diff --git a/qtpy/_version.py b/qtpy/_version.py
index 1e53025..a812ee2 100644
--- a/qtpy/_version.py
+++ b/qtpy/_version.py
@@ -1,2 +1,2 @@
-version_info = (1, 0, 1)
+version_info = (1, 0, 2)
 __version__ = '.'.join(map(str, version_info))
diff --git a/setup.py b/setup.py
index fd89fe0..41ef649 100644
--- a/setup.py
+++ b/setup.py
@@ -37,7 +37,6 @@ Basically, you write your code as if you were using PyQt5 but import qt from
 ``qtpy`` instead of ``PyQt5``.
 
 - `Issue tracker`_
-- `Contributing`_
 - `Changelog`_
 
 
@@ -61,7 +60,7 @@ setup(
     name='QtPy',
     version=version_ns['__version__'],
     packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
-    keywords=["qt PyQt4 PyQt5 PySide Widget QWidget"],
+    keywords=["qt PyQt4 PyQt5 PySide"],
     url='https://github.com/spyder-ide/qtpy',
     license='MIT',
     author='Colin Duquesnoy, The Spyder Development Team',
diff --git a/tests/tests.py b/tests/tests.py
index a45cae9..c31ef50 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -4,7 +4,7 @@ os.environ['QT_API'] = os.environ['USE_QT_API'].lower()
 
 from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
 
-print('Qt version:%s' % QtCore.__version__)
+print('Qt version:{0}'.format(QtCore.__version__))
 print(QtCore.QEvent)
 print(QtGui.QPainter)
 print(QtWidgets.QWidget)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-qtpy.git



More information about the Python-modules-commits mailing list