File: 07_qt-drop-sip-crash-workaround.patch

package info (click to toggle)
software-properties 0.111-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,944 kB
  • sloc: python: 8,238; makefile: 19; sh: 18; xml: 10
file content (52 lines) | stat: -rw-r--r-- 1,796 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From 7d3d51b072a6e85a829e558fc3e189c09786c4a3 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <mak@debian.org>
Date: Tue, 15 Apr 2025 00:21:43 +0200
Subject: [PATCH] qt: Drop sip crash workaround

This does not seem to be needed anymore with recent Python and Qt6, and
the sip4 Python package is deprecated and scheduled for removal.
---
 software-properties-qt | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/software-properties-qt b/software-properties-qt
index e88e6adc..62d5d475 100755
--- a/software-properties-qt
+++ b/software-properties-qt
@@ -35,7 +35,6 @@ from aptsources.sourceslist import SourcesList
 
 from softwareproperties.qt.SoftwarePropertiesQt import SoftwarePropertiesQt
 
-import sip
 
 class OptionParsed:
     debug = False
@@ -45,25 +44,11 @@ class OptionParsed:
 
 #--------------- main ------------------
 if __name__ == '__main__':
-    try:
-        sip.setdestroyonexit(False)
-    except AttributeError:
-        pass
     _ = gettext.gettext
 
     app = QApplication(sys.argv)
     app.setWindowIcon(QIcon.fromTheme("applications-other"))
 
-    #FIXME: Workaround for LP: 1315866
-    #       This happens due to the fact that when a Python dict is garbage
-    #       collected the order in which the individual items in the dict are
-    #       garbage collected is unpredictable, causing the dtor's to be called
-    #       after python exits. In order to work around the issue, upstream
-    #       suggested that projects disable the automatic destruction of C++
-    #       instances and C structures
-    #       Ref: http://www.riverbankcomputing.com/pipermail/pyqt/2014-March/033929.html
-    sip.setdestroyonexit(False)
-
     parser = QCommandLineParser()
     parser.addHelpOption()
     parser.addVersionOption()
-- 
2.47.2