[Python-modules-commits] [pyqt5] 01/02: Import pyqt5_5.8.2+dfsg.orig.tar.gz

Dmitry Shachnev mitya57 at moszumanska.debian.org
Tue May 9 07:27:58 UTC 2017


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

mitya57 pushed a commit to branch master
in repository pyqt5.

commit 2ca8f207e5363bd749e83676f43285d4b648529d
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Tue May 9 10:24:28 2017 +0300

    Import pyqt5_5.8.2+dfsg.orig.tar.gz
---
 ChangeLog                           | 63 +++++++++++++++++++++++++++++++++++++
 NEWS                                |  3 ++
 configure.py                        | 33 ++++++++++++++++---
 doc/sphinx/conf.py                  |  6 ++--
 doc/sphinx/introduction.rst         |  2 +-
 doc/sphinx/qml.rst                  | 11 +++++++
 pyuic/uic/driver.py                 |  5 +++
 pyuic/uic/exceptions.py             |  6 +++-
 pyuic/uic/properties.py             |  6 ++--
 pyuic/uic/pyuic.py                  |  5 ++-
 pyuic/uic/uiparser.py               |  7 +++--
 qpy/QtCore/qpycore_chimera.cpp      |  8 +++++
 sip/QtCore/qabstractitemmodel.sip   |  4 +--
 sip/QtCore/qglobal.sip              |  4 +--
 sip/QtGui/QtGuimod.sip              |  1 +
 sip/QtGui/qopengltextureblitter.sip |  2 ++
 16 files changed, 146 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5b21432..46d752f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,68 @@
+2017-03-30  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* NEWS:
+	Released as v5.8.2.
+	[96c86cda6415] [5.8.2] <5.8-maint>
+
+2017-03-29  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* lib/configure.py:
+	Fixes for the OpenGL detection needed by the incompatible
+	configuration changes in Qt v5.8.0.
+	[bf6caed84fd3] <5.8-maint>
+
+2017-03-27  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* qpy/QtCore/qpycore_chimera.cpp:
+	When parsing a Python type map list and dict to QVariantList and
+	QVariantMap.
+	[e7158e3e2a31] <5.8-maint>
+
+2017-03-24  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* lib/LICENSE.commercial, lib/LICENSE.commercial.short,
+	lib/LICENSE.gpl, lib/LICENSE.gpl.short, lib/LICENSE.internal:
+	Remove the license copies that are now part of rb-tools.
+	[c15cf2c0c055] <5.8-maint>
+
+2017-03-22  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* pyuic/uic/uiparser.py:
+	Fixed the margins of the top layout in a tab by pyuic.
+	[f5594ddfb6ee] <5.8-maint>
+
+	* pyuic/uic/driver.py, pyuic/uic/exceptions.py,
+	pyuic/uic/properties.py, pyuic/uic/pyuic.py:
+	Improved the error handling of an unknown C++ class.
+	[c4dab2a95dc6] <5.8-maint>
+
+2017-03-21  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* sphinx/qml.rst:
+	Added explicit warnings about PyQt's ability to support QML to the
+	docs.
+	[e0c7e29a7852] <5.8-maint>
+
+2017-03-16  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* PyQt5.msp:
+	Added a comment about why opengl_types.sip is included twice.
+	[95518ec3931a] <5.8-maint>
+
+	* PyQt5.msp:
+	Only enable QOpenGLTextureBlitter if OpenGL is supported.
+	[ef351b9d8f03] <5.8-maint>
+
+	* PyQt5.msp:
+	Avoid a deadlock when using asynchronous image providers in QML.
+	[33ed4db6949b] <5.8-maint>
+
 2017-03-07  Phil Thompson  <phil at riverbankcomputing.com>
 
+	* .hgtags:
+	Added tag 5.8.1 for changeset 7426ab9ba43b
+	[0ddf209259b4] <5.8-maint>
+
 	* NEWS:
 	Released as v5.8.1.
 	[7426ab9ba43b] [5.8.1] <5.8-maint>
diff --git a/NEWS b/NEWS
index 0b46b64..a0ce219 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+v5.8.2 30th March 2017
+  - This is a bug fix release.
+
 v5.8.1 7th March 2017
   - This is a bug fix release.
 
diff --git a/configure.py b/configure.py
index 20fd87c..074f2f0 100644
--- a/configure.py
+++ b/configure.py
@@ -28,7 +28,7 @@ import sys
 
 
 # Initialise the constants.
-PYQT_VERSION_STR = "5.8.1"
+PYQT_VERSION_STR = "5.8.2"
 
 SIP_MIN_VERSION = '4.19.1'
 
@@ -625,7 +625,21 @@ class TargetConfiguration:
 
         out_file = 'qtdetail.out'
 
-        source = '''#include <QCoreApplication>
+        # Note that the new configuration internals of Qt v5.8 are not
+        # backwards compatible with previous versions.  Before, module-specific
+        # details were defined in QtCore, but now they are defined in the
+        # modules themselves.  This leads to a Catch-22 situation where we have
+        # to assume certain modules exist before checking that they actually
+        # do.  For the moment we only assume QtGui is present (in addition to
+        # QtCore) because we need the OpenGL features to be properly reported.
+        # The QtPrintSupport related tests will all be invalid but we can get
+        # away with this because they will only be wrong for platforms that we
+        # cross-compile for and we use explicit configuration files for those
+        # anyway.  It does need fixing properly by splitting this test program
+        # into module-specific tests that are run instead of the current
+        # module check program.
+
+        source = '''#include <QGuiApplication>
 #include <QFile>
 #include <QLibraryInfo>
 #include <QTextStream>
@@ -640,6 +654,7 @@ int main(int argc, char **argv)
 
     QTextStream out(&outf);
 
+    // Defined in QtCore.
 #if defined(QT_SHARED) || defined(QT_DLL)
     out << "shared\\n";
 #else
@@ -648,42 +663,51 @@ int main(int argc, char **argv)
 
     // Determine which features should be disabled.
 
+    // Defined in ???.
 #if defined(QT_NO_ACCESSIBILITY)
     out << "PyQt_Accessibility\\n";
 #endif
 
+    // Defined in ???.
 #if defined(QT_NO_SESSIONMANAGER)
     out << "PyQt_SessionManager\\n";
 #endif
 
+    // Defined in ???.
 #if defined(QT_NO_SSL)
     out << "PyQt_SSL\\n";
 #endif
 
+    // Defined in QtPrintSupport.
 #if defined(QT_NO_PRINTDIALOG)
     out << "PyQt_PrintDialog\\n";
 #endif
 
+    // Defined in QtPrintSupport.
 #if defined(QT_NO_PRINTER)
     out << "PyQt_Printer\\n";
 #endif
 
+    // Defined in QtPrintSupport.
 #if defined(QT_NO_PRINTPREVIEWDIALOG)
     out << "PyQt_PrintPreviewDialog\\n";
 #endif
 
+    // Defined in QtPrintSupport.
 #if defined(QT_NO_PRINTPREVIEWWIDGET)
     out << "PyQt_PrintPreviewWidget\\n";
 #endif
 
+    // Defined in ???.
 #if defined(QT_NO_RAWFONT)
     out << "PyQt_RawFont\\n";
 #endif
 
+    // Defined in QtGui.
 #if defined(QT_NO_OPENGL)
     out << "PyQt_OpenGL\\n";
     out << "PyQt_Desktop_OpenGL\\n";
-#elif defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_3) || defined(QT_OPENGL_ES_3_1)
+#elif defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_3)
     out << "PyQt_Desktop_OpenGL\\n";
 #endif
 
@@ -698,6 +722,7 @@ int main(int argc, char **argv)
         out << "PyQt_qreal_double\\n";
 #endif
 
+    // Defined in QtCore.
 #if defined(QT_NO_PROCESS)
     out << "PyQt_Process\\n";
 #endif
@@ -706,7 +731,7 @@ int main(int argc, char **argv)
 }
 ''' % out_file
 
-        cmd = compile_qt_program(self, verbose, 'qtdetail', source, 'QtCore',
+        cmd = compile_qt_program(self, verbose, 'qtdetail', source, 'QtGui',
                 debug=debug)
 
         if cmd is None:
diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py
index b0bb48e..a195b7f 100644
--- a/doc/sphinx/conf.py
+++ b/doc/sphinx/conf.py
@@ -45,9 +45,9 @@ copyright = u'2015 Riverbank Computing Limited'
 # built documents.
 #
 # The short X.Y version.
-version = '5.8.1'
+version = '5.8.2'
 # The full version, including alpha/beta/rc tags.
-release = '5.8.1'
+release = '5.8.2'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -103,7 +103,7 @@ html_theme = 'classic'
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
-html_title = "PyQt 5.8.1 Reference Guide"
+html_title = "PyQt 5.8.2 Reference Guide"
 
 # A shorter title for the navigation bar.  Default is the same as html_title.
 #html_short_title = None
diff --git a/doc/sphinx/introduction.rst b/doc/sphinx/introduction.rst
index 622df1d..85f7c91 100644
--- a/doc/sphinx/introduction.rst
+++ b/doc/sphinx/introduction.rst
@@ -1,7 +1,7 @@
 Introduction
 ============
 
-This is the reference guide for PyQt5 5.8.1.  PyQt5 is a set of
+This is the reference guide for PyQt5 5.8.2.  PyQt5 is a set of
 `Python <http://www.python.org>`__ bindings for v5 of the Qt application
 framework from `The Qt Company <http://www.qt.io>`__.
 
diff --git a/doc/sphinx/qml.rst b/doc/sphinx/qml.rst
index b838cdc..3bc0729 100644
--- a/doc/sphinx/qml.rst
+++ b/doc/sphinx/qml.rst
@@ -26,6 +26,17 @@ particular:
 - Python properties, signals and slots can be given revision numbers that only
   those implemented by a specific version are made available to QML.
 
+.. note::
+
+    The PyQt support for QML requires knowledge of the internals of the C++
+    code that implements QML.  This can (and does) change between Qt versions
+    and may mean that some features only work with specific Qt versions and may
+    not work at all with some future version of Qt.
+
+    It is recommended that, in an MVC architecture, QML should only be used to
+    implement the view.  The model and controller should be implemented in
+    Python.
+
 
 Registering Python Types
 ------------------------
diff --git a/pyuic/uic/driver.py b/pyuic/uic/driver.py
index 905f8be..60c0d0d 100644
--- a/pyuic/uic/driver.py
+++ b/pyuic/uic/driver.py
@@ -119,6 +119,11 @@ class Driver(object):
 
         sys.stderr.write("Error in input file: %s\n" % e)
 
+    def on_NoSuchClassError(self, e):
+        """ Handle a NoSuchClassError exception. """
+
+        sys.stderr.write(str(e) + "\n")
+
     def on_NoSuchWidgetError(self, e):
         """ Handle a NoSuchWidgetError exception. """
 
diff --git a/pyuic/uic/exceptions.py b/pyuic/uic/exceptions.py
index 6ced676..3c42750 100644
--- a/pyuic/uic/exceptions.py
+++ b/pyuic/uic/exceptions.py
@@ -1,6 +1,6 @@
 #############################################################################
 ##
-## Copyright (C) 2014 Riverbank Computing Limited.
+## Copyright (C) 2017 Riverbank Computing Limited.
 ## Copyright (C) 2006 Thorsten Marek.
 ## All right reserved.
 ##
@@ -38,6 +38,10 @@
 #############################################################################
 
 
+class NoSuchClassError(Exception):
+    def __str__(self):
+        return "Unknown C++ class: %s" % self.args[0]
+
 class NoSuchWidgetError(Exception):
     def __str__(self):
         return "Unknown Qt widget: %s" % self.args[0]
diff --git a/pyuic/uic/properties.py b/pyuic/uic/properties.py
index 7c2f2fe..3b4af2a 100644
--- a/pyuic/uic/properties.py
+++ b/pyuic/uic/properties.py
@@ -1,6 +1,6 @@
 #############################################################################
 ##
-## Copyright (C) 2015 Riverbank Computing Limited.
+## Copyright (C) 2017 Riverbank Computing Limited.
 ## Copyright (C) 2006 Thorsten Marek.
 ## All right reserved.
 ##
@@ -42,7 +42,7 @@ import logging
 import os.path
 import sys
 
-from .exceptions import UnsupportedPropertyError
+from .exceptions import NoSuchClassError, UnsupportedPropertyError
 from .icon_cache import IconCache
 
 if sys.hexversion >= 0x03000000:
@@ -112,7 +112,7 @@ class Properties(object):
 
         scope = self.factory.findQObjectType(prefix)
         if scope is None:
-            raise AttributeError("unknown enum %s" % cpp_name)
+            raise NoSuchClassError(prefix)
 
         return getattr(scope, membername)
 
diff --git a/pyuic/uic/pyuic.py b/pyuic/uic/pyuic.py
index c412f63..8f3447a 100644
--- a/pyuic/uic/pyuic.py
+++ b/pyuic/uic/pyuic.py
@@ -26,7 +26,7 @@ import optparse
 from PyQt5 import QtCore
 
 from .driver import Driver
-from .exceptions import NoSuchWidgetError
+from .exceptions import NoSuchClassError, NoSuchWidgetError
 
 
 Version = "Python User Interface Compiler %s for Qt version %s" % (QtCore.PYQT_VERSION_STR, QtCore.QT_VERSION_STR)
@@ -80,6 +80,9 @@ def main():
     except SyntaxError as e:
         driver.on_SyntaxError(e)
 
+    except NoSuchClassError as e:
+        driver.on_NoSuchClassError(e)
+
     except NoSuchWidgetError as e:
         driver.on_NoSuchWidgetError(e)
 
diff --git a/pyuic/uic/uiparser.py b/pyuic/uic/uiparser.py
index e7f8eeb..7ef3799 100644
--- a/pyuic/uic/uiparser.py
+++ b/pyuic/uic/uiparser.py
@@ -138,8 +138,9 @@ class WidgetStack(list):
 
     def topIsLayoutWidget(self):
         # A plain QWidget is a layout widget unless it's parent is a
-        # QMainWindow.  Note that the corresponding uic test is a little more
-        # complicated as it involves features not supported by pyuic.
+        # QMainWindow or a QTabWidget.  Note that the corresponding uic test is
+        # a little more complicated as it involves features not supported by
+        # pyuic.
 
         if type(self[-1]) is not QtWidgets.QWidget:
             return False
@@ -147,7 +148,7 @@ class WidgetStack(list):
         if len(self) < 2:
             return False
 
-        return type(self[-2]) is not QtWidgets.QMainWindow
+        return type(self[-2]) not in (QtWidgets.QMainWindow, QtWidgets.QTabWidget)
 
 
 class ButtonGroup(object):
diff --git a/qpy/QtCore/qpycore_chimera.cpp b/qpy/QtCore/qpycore_chimera.cpp
index 7882ab4..62a782e 100644
--- a/qpy/QtCore/qpycore_chimera.cpp
+++ b/qpy/QtCore/qpycore_chimera.cpp
@@ -410,6 +410,14 @@ bool Chimera::parse_py_type(PyTypeObject *type_obj)
         _metatype = QMetaType::Int;
         _name = sipPyTypeName(type_obj);
     }
+    else if (type_obj == &PyList_Type)
+    {
+        _metatype = QMetaType::QVariantList;
+    }
+    else if (type_obj == &PyDict_Type)
+    {
+        _metatype = QMetaType::QVariantMap;
+    }
 #if PY_MAJOR_VERSION >= 3
     else if (type_obj == &PyUnicode_Type)
     {
diff --git a/sip/QtCore/qabstractitemmodel.sip b/sip/QtCore/qabstractitemmodel.sip
index fd5887c..096d4d2 100644
--- a/sip/QtCore/qabstractitemmodel.sip
+++ b/sip/QtCore/qabstractitemmodel.sip
@@ -235,8 +235,8 @@ protected:
     void endMoveRows();
     bool beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn);
     void endMoveColumns();
-    void beginResetModel();
-    void endResetModel();
+    void beginResetModel() /ReleaseGIL/;
+    void endResetModel() /ReleaseGIL/;
 
 protected slots:
 %If (Qt_5_1_0 -)
diff --git a/sip/QtCore/qglobal.sip b/sip/QtCore/qglobal.sip
index aab78eb..13d0548 100644
--- a/sip/QtCore/qglobal.sip
+++ b/sip/QtCore/qglobal.sip
@@ -29,8 +29,8 @@ int PYQT_VERSION;
 const char *PYQT_VERSION_STR;
 
 %ModuleCode
-static int PYQT_VERSION = 0x050801;
-static const char *PYQT_VERSION_STR = "5.8.1";
+static int PYQT_VERSION = 0x050802;
+static const char *PYQT_VERSION_STR = "5.8.2";
 %End
 const int QT_VERSION;
 const char *QT_VERSION_STR;
diff --git a/sip/QtGui/QtGuimod.sip b/sip/QtGui/QtGuimod.sip
index 9de3cbc..afe9f23 100644
--- a/sip/QtGui/QtGuimod.sip
+++ b/sip/QtGui/QtGuimod.sip
@@ -45,6 +45,7 @@ WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 %DefaultSupertype sip.simplewrapper
 
+// Note this is also appended by configure.py but is explicitly needed here (probably a SIP bug).
 %Include opengl_types.sip
 
 %Include qabstracttextdocumentlayout.sip
diff --git a/sip/QtGui/qopengltextureblitter.sip b/sip/QtGui/qopengltextureblitter.sip
index 32c0974..5cf010d 100644
--- a/sip/QtGui/qopengltextureblitter.sip
+++ b/sip/QtGui/qopengltextureblitter.sip
@@ -21,6 +21,7 @@
 
 
 %If (Qt_5_8_0 -)
+%If (PyQt_OpenGL)
 
 class QOpenGLTextureBlitter
 {
@@ -56,3 +57,4 @@ private:
 };
 
 %End
+%End

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



More information about the Python-modules-commits mailing list