[Python-modules-commits] r14334 - in packages/pyside/branches/trunk-maverick/debian (5 files)

odyx-guest at users.alioth.debian.org odyx-guest at users.alioth.debian.org
Tue Aug 31 13:23:54 UTC 2010


    Date: Tuesday, August 31, 2010 @ 13:23:45
  Author: odyx-guest
Revision: 14334

Merge branch 'trunk' into trunk-maverick

Conflicts:
	debian/changelog
	debian/control

Added:
  packages/pyside/branches/trunk-maverick/debian/patches/u_20e226b_fix_missing_qcoreapplication_arguments_method.patch
  packages/pyside/branches/trunk-maverick/debian/patches/u_268bf77_fixed_signal_signature_parser.patch
Modified:
  packages/pyside/branches/trunk-maverick/debian/changelog
  packages/pyside/branches/trunk-maverick/debian/control
  packages/pyside/branches/trunk-maverick/debian/patches/series

Modified: packages/pyside/branches/trunk-maverick/debian/changelog
===================================================================
--- packages/pyside/branches/trunk-maverick/debian/changelog	2010-08-31 13:23:22 UTC (rev 14333)
+++ packages/pyside/branches/trunk-maverick/debian/changelog	2010-08-31 13:23:45 UTC (rev 14334)
@@ -1,3 +1,20 @@
+pyside (0.4.0-2~exp0) maverick; urgency=low
+
+  * Merge from debian trunk.
+
+  * Bump shiboken B-D to 0.4.0-1~exp1 as it fixes a test segfault
+    (upstream bug: #243)
+
+  * Patches:
+   - u_20e226b_fix_missing_qcoreapplication_arguments_method.patch
+      Import from upstream to fix a missing method in QtCore.
+      (upstream bug: #303)
+   - u_268bf77_fixed_signal_signature_parser.patch
+      Import from upstream to fix the incorrect signal signatures
+      (upstream bug: #311)
+
+ -- Didier Raboud <didier at raboud.com>  Tue, 31 Aug 2010 15:15:20 +0200
+
 pyside (0.4.0-1+ubuntu6) maverick; urgency=low
 
   * Re-enforce the libpyside-dev dependency.

Modified: packages/pyside/branches/trunk-maverick/debian/control
===================================================================
--- packages/pyside/branches/trunk-maverick/debian/control	2010-08-31 13:23:22 UTC (rev 14333)
+++ packages/pyside/branches/trunk-maverick/debian/control	2010-08-31 13:23:45 UTC (rev 14334)
@@ -6,7 +6,7 @@
 Build-Depends: debhelper (>= 7.4.12~), cmake (>= 2.8.2), dpkg-dev (>= 1.15.6),
 	python-all-dev (>= 2.3.5-11), python-all-dbg (>= 2.3.5-11), python-support (>= 0.3.9),
 	libqt4-dev, libphonon-dev, libqt4-opengl-dev, libqtwebkit-dev,
-	shiboken (>= 0.4.0), libshiboken-dev (>= 0.4.0), shiboken-dbg (>= 0.4.0),
+	shiboken (>= 0.4.0-1~exp1), libshiboken-dev (>= 0.4.0-1~exp1), shiboken-dbg (>= 0.4.0-1~exp1),
 	generatorrunner (>= 0.6.0),
 	libqt4-sql-sqlite, xvfb, xauth,
 	phonon-backend-gstreamer

Modified: packages/pyside/branches/trunk-maverick/debian/patches/series
===================================================================
--- packages/pyside/branches/trunk-maverick/debian/patches/series	2010-08-31 13:23:22 UTC (rev 14333)
+++ packages/pyside/branches/trunk-maverick/debian/patches/series	2010-08-31 13:23:45 UTC (rev 14334)
@@ -1,4 +1,6 @@
 u_c130273_fix_py25_QtScript_property.patch
+u_20e226b_fix_missing_qcoreapplication_arguments_method.patch
+u_268bf77_fixed_signal_signature_parser.patch
 libPythonVersionPostfix.patch
 usePySpecificShiboken.patch
 lessBuildVerbosity.patch

Added: packages/pyside/branches/trunk-maverick/debian/patches/u_20e226b_fix_missing_qcoreapplication_arguments_method.patch
===================================================================
--- packages/pyside/branches/trunk-maverick/debian/patches/u_20e226b_fix_missing_qcoreapplication_arguments_method.patch	                        (rev 0)
+++ packages/pyside/branches/trunk-maverick/debian/patches/u_20e226b_fix_missing_qcoreapplication_arguments_method.patch	2010-08-31 13:23:45 UTC (rev 14334)
@@ -0,0 +1,26 @@
+From 20e226bc663e88849cd269043ebc9b7e223d5c10 Mon Sep 17 00:00:00 2001
+From: Hugo Parente Lima <hugo.pl at gmail.com>
+Date: Wed, 25 Aug 2010 12:08:03 -0300
+Subject: [PATCH] Fix bug#303 - "Missing method: QCoreApplication.arguments()"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Reviewer: Luciano Wolf <luciano.wolf at openbossa.org>
+          Renato Araújo <renato.filho at openbossa.org>
+---
+ PySide/QtCore/typesystem_core.xml |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+Index: pyside/PySide/QtCore/typesystem_core.xml
+===================================================================
+--- pyside.orig/PySide/QtCore/typesystem_core.xml	2010-08-03 19:06:31.000000000 +0200
++++ pyside/PySide/QtCore/typesystem_core.xml	2010-08-31 15:09:05.000000000 +0200
+@@ -1817,7 +1817,6 @@
+         <define-ownership owner="c++"/>
+       </modify-argument>
+     </modify-function>
+-    <modify-function signature="arguments()" remove="all"/>
+   </object-type>
+   <object-type name="QSettings">
+     <extra-includes>

Added: packages/pyside/branches/trunk-maverick/debian/patches/u_268bf77_fixed_signal_signature_parser.patch
===================================================================
--- packages/pyside/branches/trunk-maverick/debian/patches/u_268bf77_fixed_signal_signature_parser.patch	                        (rev 0)
+++ packages/pyside/branches/trunk-maverick/debian/patches/u_268bf77_fixed_signal_signature_parser.patch	2010-08-31 13:23:45 UTC (rev 14334)
@@ -0,0 +1,118 @@
+From 268bf7735b787d2310e18b3aed262bd27b9d24c6 Mon Sep 17 00:00:00 2001
+From: Renato Filho <renato.filho at openbossa.org>
+Date: Thu, 26 Aug 2010 12:02:59 -0300
+Subject: [PATCH] Fixed signal signature parser.
+
+Fixes bug #311.
+
+Reviewer: Luciano Wolf <luciano.wolf at openbossa.org>
+          Hugo Parente Lima <hugo.pl at gmail.com>
+---
+ libpyside/qsignal.cpp        |   21 +++++++++++++--------
+ tests/signals/CMakeLists.txt |    1 +
+ tests/signals/bug_311.py     |   42 ++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 56 insertions(+), 8 deletions(-)
+ create mode 100644 tests/signals/bug_311.py
+
+diff --git a/libpyside/qsignal.cpp b/libpyside/qsignal.cpp
+index f465a7b..6c54203 100644
+--- a/libpyside/qsignal.cpp
++++ b/libpyside/qsignal.cpp
+@@ -250,15 +250,21 @@ char* signal_get_type_name(PyObject* type)
+         char *typeName = NULL;
+         if (type->ob_type == &Shiboken::SbkBaseWrapperType_Type) {
+             Shiboken::SbkBaseWrapperType *objType = reinterpret_cast<Shiboken::SbkBaseWrapperType*>(type);
++            Q_ASSERT(objType->original_name);
+             typeName = strdup(objType->original_name);
+         } else {
+-            //tp_name return the full name
+-            Shiboken::AutoDecRef otypeName(PyObject_GetAttrString(type, "__name__"));
+-            typeName = strdup(PyString_AS_STRING(otypeName.object()));
+-        }
+-        if (Shiboken::TypeResolver::getType(typeName) == Shiboken::TypeResolver::ObjectType) {
+-            typeName = reinterpret_cast<char*>(realloc(typeName, strlen(typeName) + 1));
+-            typeName = strcat(typeName, "*");
++            // Translate python types to Qt names
++            PyTypeObject *objType = reinterpret_cast<PyTypeObject*>(type);
++            if (objType == &PyString_Type)
++                typeName = strdup("QString");
++            else if (objType == &PyInt_Type)
++                typeName = strdup("int");
++            else if (objType == &PyLong_Type)
++                typeName = strdup("long");
++            else if (objType == &PyFloat_Type)
++                typeName = strdup("qreal");
++            else
++                typeName = strdup("object");
+         }
+         return typeName;
+     } else if (PyString_Check(type)) {
+@@ -277,7 +283,6 @@ char* signal_build_signature(const char *name, const char *signature)
+ char* signal_parse_signature(PyObject *args)
+ {
+     char *signature = 0;
+-
+     if (args && (PyString_Check(args) || (!PySequence_Check(args) && (args != Py_None))))
+         return signal_get_type_name(args);
+ 
+diff --git a/tests/signals/CMakeLists.txt b/tests/signals/CMakeLists.txt
+index eda247d..a69aa06 100644
+--- a/tests/signals/CMakeLists.txt
++++ b/tests/signals/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ PYSIDE_TEST(args_dont_match_test.py)
++PYSIDE_TEST(bug_311.py)
+ PYSIDE_TEST(decorators_test.py)
+ PYSIDE_TEST(invalid_callback_test.py)
+ PYSIDE_TEST(lambda_gui_test.py)
+diff --git a/tests/signals/bug_311.py b/tests/signals/bug_311.py
+new file mode 100644
+index 0000000..42ed5f3
+--- /dev/null
++++ b/tests/signals/bug_311.py
+@@ -0,0 +1,42 @@
++#!/usr/bin/env python
++# -*- coding: utf-8 -*-
++
++import unittest
++from PySide import QtCore
++from helper import UsesQCoreApplication
++
++class DerivedDate(QtCore.QDate):
++    def __init__(self,y,m,d):
++        super(DerivedDate,self).__init__(y,m,d)
++
++class Emitter(QtCore.QObject):
++    dateSignal1 = QtCore.Signal(QtCore.QDate)
++    dateSignal2 = QtCore.Signal(DerivedDate)
++    tupleSignal = QtCore.Signal(tuple)
++
++class SignaltoSignalTest(UsesQCoreApplication):
++    def myCb(self, dt):
++        self._dt = dt
++
++    def testBug(self):
++        e = Emitter()
++        d = DerivedDate(2010,8,24)
++        self._dt = None
++        e.dateSignal1.connect(self.myCb)
++        e.dateSignal1.emit(d)
++        self.assertEqual(self._dt, d)
++
++        self._dt = None
++        e.dateSignal2.connect(self.myCb)
++        e.dateSignal2.emit(d)
++        self.assertEqual(self._dt, d)
++
++        myTuple = (5, 6, 7)
++        self._dt = None
++        e.tupleSignal.connect(self.myCb)
++        e.tupleSignal.emit(myTuple)
++        self.assertEqual(myTuple, self._dt)
++
++if __name__ == '__main__':
++    unittest.main()
++
+-- 
+1.6.1
+




More information about the Python-modules-commits mailing list