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

Dmitry Shachnev mitya57 at moszumanska.debian.org
Sat Mar 11 14:24:25 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 8bea4a797c45d8bbb293b884d6e65d1a188f9eca
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date:   Sat Mar 11 17:22:35 2017 +0300

    Import pyqt5_5.8.1+dfsg.orig.tar.gz
---
 ChangeLog                                    | 63 ++++++++++++++++++++++++++++
 NEWS                                         |  3 ++
 configure.py                                 |  4 +-
 doc/sphinx/conf.py                           |  6 +--
 doc/sphinx/introduction.rst                  |  2 +-
 doc/sphinx/pyqt_qvariant.rst                 |  4 +-
 qpy/QtCore/qpycore_chimera.cpp               | 11 ++++-
 qpy/QtQml/qpyqml_register_type.cpp           | 34 +++++++++++++--
 qpy/QtQml/qpyqmlobject.cpp                   |  7 ++++
 sip/QtCore/QtCoremod.sip                     |  2 +-
 sip/QtCore/qglobal.sip                       |  4 +-
 sip/QtCore/qlocale.sip                       |  8 ++++
 sip/QtPrintSupport/qpyprintsupport_qlist.sip |  8 ++++
 13 files changed, 141 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ca189d3..5b21432 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,68 @@
+2017-03-07  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* NEWS:
+	Released as v5.8.1.
+	[7426ab9ba43b] [5.8.1] <5.8-maint>
+
+2017-03-03  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* qpy/QtCore/qpycore_chimera.cpp:
+	Special case a QVariant containing std::nullptr_t.
+	[001ad7fc01fb] <5.8-maint>
+
+2017-02-27  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* METADATA.in:
+	Updated the Requires-Dist meta-data so it includes the values from
+	the release file.
+	[2933ac7bf19d] <5.8-maint>
+
+2017-02-24  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* lib/configure.py:
+	Disable desktop OpenGL if OpenGLES v3 or v3.1 is detected.
+	[4ba0f0b49e2a] <5.8-maint>
+
+	* qpy/QtQml/qpyqml_register_type.cpp:
+	Fixed the handling of properties in Qml because of changes to the
+	internals in Qt v5.8.0.
+	[feeab3eb94fa] <5.8-maint>
+
+2017-02-22  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* PyQt5.msp:
+	Fixed QLocale.toString() for Python v2.
+	[027b070ff19e] <5.8-maint>
+
+	* PyQt5.msp:
+	Anticipate that Qt v5.9.0 will be released before Qt v5.8.1 to avoid
+	problems building PyQt v5.9 against Qt v5.8.1.
+	[6022c9537b69] <5.8-maint>
+
+2017-02-21  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* qpy/QtPrintSupport/qpyprintsupport_qlist.sip:
+	The QtPrintSupport mapped types are only included if printers are
+	supported.
+	[7b3afef45f92] <5.8-maint>
+
+	* sphinx/pyqt_qvariant.rst:
+	Updated the docs regarding support for QVariant.
+	[657a7b5e45ce] <5.8-maint>
+
+2017-02-16  Phil Thompson  <phil at riverbankcomputing.com>
+
+	* qpy/QtQml/qpyqmlobject.cpp:
+	Fixed signals in QML registered types that are defined in a Python
+	sub-class of the registered type.
+	[e5d27b6ce571] <5.8-maint>
+
 2017-02-15  Phil Thompson  <phil at riverbankcomputing.com>
 
+	* .hgtags:
+	Added tag 5.8 for changeset a04bf1746ae4
+	[f12c11450b7f]
+
 	* NEWS:
 	Released as v5.8.
 	[a04bf1746ae4] [5.8]
diff --git a/NEWS b/NEWS
index 57a420a..0b46b64 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+v5.8.1 7th March 2017
+  - This is a bug fix release.
+
 v5.8 15th February 2017
   - Added support for Qt v5.8.0.
   - Added __fspath__() to QFileInfo.
diff --git a/configure.py b/configure.py
index 94345c3..20fd87c 100644
--- a/configure.py
+++ b/configure.py
@@ -28,7 +28,7 @@ import sys
 
 
 # Initialise the constants.
-PYQT_VERSION_STR = "5.8"
+PYQT_VERSION_STR = "5.8.1"
 
 SIP_MIN_VERSION = '4.19.1'
 
@@ -683,7 +683,7 @@ int main(int argc, char **argv)
 #if defined(QT_NO_OPENGL)
     out << "PyQt_OpenGL\\n";
     out << "PyQt_Desktop_OpenGL\\n";
-#elif defined(QT_OPENGL_ES_2)
+#elif defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_ES_3) || defined(QT_OPENGL_ES_3_1)
     out << "PyQt_Desktop_OpenGL\\n";
 #endif
 
diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py
index b17130d..b0bb48e 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'
+version = '5.8.1'
 # The full version, including alpha/beta/rc tags.
-release = '5.8'
+release = '5.8.1'
 
 # 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 Reference Guide"
+html_title = "PyQt 5.8.1 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 7cc1bb2..622df1d 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.  PyQt5 is a set of
+This is the reference guide for PyQt5 5.8.1.  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/pyqt_qvariant.rst b/doc/sphinx/pyqt_qvariant.rst
index b29f5d2..3f473f2 100644
--- a/doc/sphinx/pyqt_qvariant.rst
+++ b/doc/sphinx/pyqt_qvariant.rst
@@ -37,4 +37,6 @@ The actual value of a wrapped Python :class:`~PyQt5.QtCore.QVariant` is
 obtained by calling its :meth:`~PyQt5.QtCore.QVariant.value` method.  (Note
 that in PyQt4's v1 API this method is called ``toPyObject()``.)
 
-PyQt5 does not support the ``QPyNullVariant`` class as it is no longer needed.
+PyQt5 does not support the ``QPyNullVariant`` class as a null
+:class:`~PyQt5.QtCore.QVariant` is automatically converted to ``None`` and vice
+versa.
diff --git a/qpy/QtCore/qpycore_chimera.cpp b/qpy/QtCore/qpycore_chimera.cpp
index a68ea7c..7882ab4 100644
--- a/qpy/QtCore/qpycore_chimera.cpp
+++ b/qpy/QtCore/qpycore_chimera.cpp
@@ -1579,8 +1579,17 @@ PyObject *Chimera::toAnyPyObject(const QVariant &var)
     }
 
     const char *type_name = var.typeName();
-    const sipTypeDef *td = sipFindType(type_name);
 
+    // Qt v5.8.0 changed the way it was handling null in QML.  We treat it as a
+    // special case though there may be other implications still to be
+    // discovered.
+    if (qstrcmp(type_name, "std::nullptr_t") == 0)
+    {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+
+    const sipTypeDef *td = sipFindType(type_name);
     Chimera *ct = new Chimera;
 
     ct->_type = td;
diff --git a/qpy/QtQml/qpyqml_register_type.cpp b/qpy/QtQml/qpyqml_register_type.cpp
index 6d7a772..a17488f 100644
--- a/qpy/QtQml/qpyqml_register_type.cpp
+++ b/qpy/QtQml/qpyqml_register_type.cpp
@@ -124,13 +124,13 @@ static int register_type(QQmlPrivate::RegisterType *rt)
 
 #define QPYQML_TYPE_INIT(n) \
     case n##U: \
-        QPyQmlObject##n::staticMetaObject = *mo; \
+        QPyQmlObject##n::staticMetaObject = static_mo; \
         QPyQmlObject##n::attachedPyType = attached; \
         rt->typeId = qRegisterNormalizedMetaType<QPyQmlObject##n *>(ptr_name); \
         rt->listId = qRegisterNormalizedMetaType<QQmlListProperty<QPyQmlObject##n> >(list_name); \
         rt->objectSize = ctor ? sizeof(QPyQmlObject##n) : 0; \
         if (ctor) rt->create = QQmlPrivate::createInto<QPyQmlObject##n>; else rt->create = 0; \
-        rt->metaObject = mo; \
+        rt->metaObject = &QPyQmlObject##n::staticMetaObject; \
         rt->attachedPropertiesFunction = attached_mo ? QPyQmlObject##n::attachedProperties : 0; \
         rt->attachedPropertiesMetaObject = attached_mo; \
         rt->parserStatusCast = is_parser_status ? QQmlPrivate::StaticCastSelector<QPyQmlObject##n,QQmlParserStatus>::cast() : -1; \
@@ -219,7 +219,33 @@ static QQmlPrivate::RegisterType *init_type(PyTypeObject *py_type, bool ctor,
         return 0;
     }
 
-    const QMetaObject *mo = pyqt5_qtqml_get_qmetaobject(py_type);
+    const QMetaObject *orig_mo = pyqt5_qtqml_get_qmetaobject(py_type);
+    QMetaObject static_mo = *orig_mo;
+
+#if QT_VERSION >= 0x050800
+    // Qt v5.8.0 changed the way properties are handled by directly calling a
+    // class's static meta-call (if there was one) directly.  This bypasses the
+    // proxy and calls the static meta-call with a pointer to the proxy rather
+    // than a pointer to the real object.  To work round this we clone the
+    // QMetaObject chain and remove the references to the static meta-call
+    // forcing the earlier behaviour.  This approach may also work with earlier
+    // versions of Qt - but if it ain't broke...
+    static_mo.d.static_metacall = 0;
+
+    QMetaObject *sub_mo = &static_mo;
+
+    // By retaining the QObject static meta-object we don't appear to be a
+    // gadget.
+    for (const QMetaObject *mo = sub_mo->d.superdata; mo != &QObject::staticMetaObject; mo = mo->d.superdata)
+    {
+        QMetaObject *new_mo = new QMetaObject;
+        *new_mo = *mo;
+        new_mo->d.static_metacall = 0;
+
+        sub_mo->d.superdata = new_mo;
+        sub_mo = new_mo;
+    }
+#endif
 
     // See if the type is a parser status.
     bool is_parser_status = PyType_IsSubtype(py_type,
@@ -272,7 +298,7 @@ static QQmlPrivate::RegisterType *init_type(PyTypeObject *py_type, bool ctor,
 
     if (qquickitem_register)
     {
-        sipErrorState estate = qquickitem_register(py_type, mo, ptr_name,
+        sipErrorState estate = qquickitem_register(py_type, orig_mo, ptr_name,
                 list_name, &rt);
 
         if (estate == sipErrorFail)
diff --git a/qpy/QtQml/qpyqmlobject.cpp b/qpy/QtQml/qpyqmlobject.cpp
index 1dc9934..ad4ce15 100644
--- a/qpy/QtQml/qpyqmlobject.cpp
+++ b/qpy/QtQml/qpyqmlobject.cpp
@@ -111,6 +111,13 @@ int QPyQmlObjectProxy::qt_metacall(QMetaObject::Call call, int idx, void **args)
     // Note that we used to use sender() but this proved unreliable.
     if (call == QMetaObject::InvokeMetaMethod && proxied_mo->method(idx).methodType() == QMetaMethod::Signal)
     {
+        // Get the meta-object of the class that defines the signal.
+        while (idx < proxied_mo->methodOffset())
+        {
+            proxied_mo = proxied_mo->superClass();
+            Q_ASSERT(proxied_mo);
+        }
+
         // Relay the signal to QML.
         QMetaObject::activate(this, proxied_mo,
                 idx - proxied_mo->methodOffset(), args);
diff --git a/sip/QtCore/QtCoremod.sip b/sip/QtCore/QtCoremod.sip
index b727bac..a73ffb1 100644
--- a/sip/QtCore/QtCoremod.sip
+++ b/sip/QtCore/QtCoremod.sip
@@ -22,7 +22,7 @@
 
 %Module(name=PyQt5.QtCore, call_super_init=True, default_VirtualErrorHandler=PyQt5, keyword_arguments="Optional", use_limited_api=True)
 
-%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_6_2 Qt_5_6_3 Qt_5_6_4 Qt_5_6_5 Qt_5_6_6 Qt_5_6_7 Qt_5_6_8 Qt_5_6_9 Qt_5_7_0 Qt_5_7_1 Qt_5_8_0}
+%Timeline {Qt_5_0_0 Qt_5_0_1 Qt_5_0_2 Qt_5_1_0 Qt_5_1_1 Qt_5_2_0 Qt_5_2_1 Qt_5_3_0 Qt_5_3_1 Qt_5_3_2 Qt_5_4_0 Qt_5_4_1 Qt_5_4_2 Qt_5_5_0 Qt_5_5_1 Qt_5_6_0 Qt_5_6_1 Qt_5_6_2 Qt_5_6_3 Qt_5_6_4 Qt_5_6_5 Qt_5_6_6 Qt_5_6_7 Qt_5_6_8 Qt_5_6_9 Qt_5_7_0 Qt_5_7_1 Qt_5_8_0 Qt_5_8_1 Qt_5_9_0}
 
 %Platforms {WS_X11 WS_WIN WS_MACX}
 
diff --git a/sip/QtCore/qglobal.sip b/sip/QtCore/qglobal.sip
index d78c9bd..aab78eb 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 = 0x050800;
-static const char *PYQT_VERSION_STR = "5.8";
+static int PYQT_VERSION = 0x050801;
+static const char *PYQT_VERSION_STR = "5.8.1";
 %End
 const int QT_VERSION;
 const char *QT_VERSION_STR;
diff --git a/sip/QtCore/qlocale.sip b/sip/QtCore/qlocale.sip
index bc2ecbc..df923aa 100644
--- a/sip/QtCore/qlocale.sip
+++ b/sip/QtCore/qlocale.sip
@@ -1425,11 +1425,19 @@ public:
         }
         else
         {
+        #if PY_MAJOR_VERSION >= 3
         #if defined(HAVE_LONG_LONG)
             unsigned PY_LONG_LONG value = PyLong_AsUnsignedLongLongMask(a0);
         #else
             unsigned long value = PyLong_AsUnsignedLongMask(a0);
         #endif
+        #else
+        #if defined(HAVE_LONG_LONG)
+            unsigned PY_LONG_LONG value = PyInt_AsUnsignedLongLongMask(a0);
+        #else
+            unsigned long value = PyInt_AsUnsignedLongMask(a0);
+        #endif
+        #endif
         
             if (PyErr_Occurred() && !PyErr_ExceptionMatches(PyExc_OverflowError))
             {
diff --git a/sip/QtPrintSupport/qpyprintsupport_qlist.sip b/sip/QtPrintSupport/qpyprintsupport_qlist.sip
index b41064f..cfd675d 100644
--- a/sip/QtPrintSupport/qpyprintsupport_qlist.sip
+++ b/sip/QtPrintSupport/qpyprintsupport_qlist.sip
@@ -19,6 +19,8 @@
 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 
+%If (PyQt_Printer)
+
 %MappedType QList<QPagedPaintDevice::PageSize>
         /TypeHintIn="Iterable[QPagedPaintDevice.PageSize]",
         TypeHintOut="List[QPagedPaintDevice.PageSize]", TypeHintValue="[]"/
@@ -121,6 +123,10 @@
 %End
 };
 
+%End
+
+
+%If (PyQt_Printer)
 
 %If (Qt_5_4_0 -)
 
@@ -227,3 +233,5 @@
 };
 
 %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