aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/fix-some-deprecated-code.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/fix-some-deprecated-code.patch')
-rw-r--r--debian/patches/fix-some-deprecated-code.patch182
1 files changed, 182 insertions, 0 deletions
diff --git a/debian/patches/fix-some-deprecated-code.patch b/debian/patches/fix-some-deprecated-code.patch
new file mode 100644
index 0000000..2cbca09
--- /dev/null
+++ b/debian/patches/fix-some-deprecated-code.patch
@@ -0,0 +1,182 @@
+Description: Fix some deprecated code
+Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+Bug-Ubuntu: https://launchpad.net/bugs/1951985
+Last-Update: 2021-11-23
+---
+ aptdaemon/client.py | 52 ++++++++++++++++++++++++++--------------------------
+ aptdaemon/errors.py | 2 +-
+ aptdaemon/gtk3widgets.py | 6 +++---
+ 3 files changed, 30 insertions(+), 30 deletions(-)
+
+diff --git a/aptdaemon/client.py b/aptdaemon/client.py
+index c9fccd2..db032a3 100644
+--- a/aptdaemon/client.py
++++ b/aptdaemon/client.py
+@@ -385,10 +385,10 @@ class AptTransaction(GObject.Object):
+ dependencies before the transaction will be executed.
+ """
+
+- __gsignals__ = {"finished": (GObject.SIGNAL_RUN_FIRST,
++ __gsignals__ = {"finished": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "dependencies-changed": (GObject.SIGNAL_RUN_FIRST,
++ "dependencies-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_PYOBJECT,
+ GObject.TYPE_PYOBJECT,
+@@ -397,37 +397,37 @@ class AptTransaction(GObject.Object):
+ GObject.TYPE_PYOBJECT,
+ GObject.TYPE_PYOBJECT,
+ GObject.TYPE_PYOBJECT)),
+- "download-changed": (GObject.SIGNAL_RUN_FIRST,
++ "download-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_INT64,)),
+- "space-changed": (GObject.SIGNAL_RUN_FIRST,
++ "space-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_INT64,)),
+- "error": (GObject.SIGNAL_RUN_FIRST,
++ "error": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING, GObject.TYPE_STRING)),
+- "role-changed": (GObject.SIGNAL_RUN_FIRST,
++ "role-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "terminal-attached-changed": (GObject.SIGNAL_RUN_FIRST,
++ "terminal-attached-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_BOOLEAN,)),
+- "cancellable-changed": (GObject.SIGNAL_RUN_FIRST,
++ "cancellable-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_BOOLEAN,)),
+- "meta-data-changed": (GObject.SIGNAL_RUN_FIRST,
++ "meta-data-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_PYOBJECT,)),
+- "status-changed": (GObject.SIGNAL_RUN_FIRST,
++ "status-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "status-details-changed": (GObject.SIGNAL_RUN_FIRST,
++ "status-details-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "progress-changed": (GObject.SIGNAL_RUN_FIRST,
++ "progress-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_INT,)),
+- "progress-details-changed": (GObject.SIGNAL_RUN_FIRST,
++ "progress-details-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_INT,
+ GObject.TYPE_INT,
+@@ -435,7 +435,7 @@ class AptTransaction(GObject.Object):
+ GObject.TYPE_INT64,
+ GObject.TYPE_INT,
+ GObject.TYPE_INT64)),
+- "progress-download-changed": (GObject.SIGNAL_RUN_FIRST,
++ "progress-download-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,
+ GObject.TYPE_STRING,
+@@ -443,7 +443,7 @@ class AptTransaction(GObject.Object):
+ GObject.TYPE_INT64,
+ GObject.TYPE_INT64,
+ GObject.TYPE_STRING)),
+- "packages-changed": (GObject.SIGNAL_RUN_FIRST,
++ "packages-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_PYOBJECT,
+ GObject.TYPE_PYOBJECT,
+@@ -451,39 +451,39 @@ class AptTransaction(GObject.Object):
+ GObject.TYPE_PYOBJECT,
+ GObject.TYPE_PYOBJECT,
+ GObject.TYPE_PYOBJECT)),
+- "unauthenticated-changed": (GObject.SIGNAL_RUN_FIRST,
++ "unauthenticated-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_PYOBJECT,)),
+- "paused": (GObject.SIGNAL_RUN_FIRST,
++ "paused": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ ()),
+- "resumed": (GObject.SIGNAL_RUN_FIRST,
++ "resumed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ ()),
+- "allow-unauthenticated-changed": (GObject.SIGNAL_RUN_FIRST,
++ "allow-unauthenticated-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_BOOLEAN,)),
+ "remove-obsoleted-depends-changed": (
+- GObject.SIGNAL_RUN_FIRST,
++ GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_BOOLEAN,)),
+- "locale-changed": (GObject.SIGNAL_RUN_FIRST,
++ "locale-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "terminal-changed": (GObject.SIGNAL_RUN_FIRST,
++ "terminal-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "debconf-socket-changed": (GObject.SIGNAL_RUN_FIRST,
++ "debconf-socket-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "http-proxy-changed": (GObject.SIGNAL_RUN_FIRST,
++ "http-proxy-changed": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,)),
+- "medium-required": (GObject.SIGNAL_RUN_FIRST,
++ "medium-required": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,
+ GObject.TYPE_STRING)),
+- "config-file-conflict": (GObject.SIGNAL_RUN_FIRST,
++ "config-file-conflict": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE,
+ (GObject.TYPE_STRING,
+ GObject.TYPE_STRING)),
+diff --git a/aptdaemon/errors.py b/aptdaemon/errors.py
+index 4783179..cd98d6e 100644
+--- a/aptdaemon/errors.py
++++ b/aptdaemon/errors.py
+@@ -174,7 +174,7 @@ def convert_dbus_exception(func):
+ This decorator requires introspection to the decorated function. So it
+ cannot be used on any already decorated method.
+ """
+- argnames, varargs, kwargs, defaults = inspect.getargspec(func)
++ argnames, varargs, kwargs, defaults = inspect.getfullargspec(func)[:4]
+
+ @wraps(func)
+ def _convert_dbus_exception(*args, **kwargs):
+diff --git a/aptdaemon/gtk3widgets.py b/aptdaemon/gtk3widgets.py
+index af9faec..5c99c1d 100644
+--- a/aptdaemon/gtk3widgets.py
++++ b/aptdaemon/gtk3widgets.py
+@@ -562,7 +562,7 @@ class AptProgressDialog(Gtk.Dialog):
+ features a progress bar, cancel button, status icon and label
+ """
+
+- __gsignals__ = {"finished": (GObject.SIGNAL_RUN_FIRST,
++ __gsignals__ = {"finished": (GObject.SignalFlags.RUN_FIRST,
+ GObject.TYPE_NONE, ())}
+
+ def __init__(self, transaction=None, parent=None, terminal=True,
+@@ -1086,8 +1086,8 @@ class AptConfigFileConflictDialog(_ExpandableDialog):
+ return _ExpandableDialog.run(self)
+
+
+-REGEX_RANGE = "^@@ \-(?P<from_start>[0-9]+)(?:,(?P<from_context>[0-9]+))? " \
+- "\+(?P<to_start>[0-9]+)(?:,(?P<to_context>[0-9]+))? @@"
++REGEX_RANGE = "^@@ \\-(?P<from_start>[0-9]+)(?:,(?P<from_context>[0-9]+))? " \
++ "\\+(?P<to_start>[0-9]+)(?:,(?P<to_context>[0-9]+))? @@"
+
+
+ class DiffView(Gtk.TextView):