Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-ntfy for openSUSE:Factory 
checked in at 2023-01-08 21:25:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ntfy (Old)
 and      /work/SRC/openSUSE:Factory/.python-ntfy.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-ntfy"

Sun Jan  8 21:25:21 2023 rev:10 rq:1056787 version:2.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ntfy/python-ntfy.changes  2022-07-19 
17:20:22.464447624 +0200
+++ /work/SRC/openSUSE:Factory/.python-ntfy.new.1563/python-ntfy.changes        
2023-01-08 21:25:23.099192025 +0100
@@ -1,0 +2,6 @@
+Sat Jan  7 14:14:56 UTC 2023 - Matthias Bach <ma...@marix.org>
+
+- Add python-311-compat.patch to achieve compatibility with Python
+  3.11.
+
+-------------------------------------------------------------------

New:
----
  python-311-compat.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-ntfy.spec ++++++
--- /var/tmp/diff_new_pack.pYO0MQ/_old  2023-01-08 21:25:23.855196516 +0100
+++ /var/tmp/diff_new_pack.pYO0MQ/_new  2023-01-08 21:25:23.863196563 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-ntfy
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 # Copyright (c) 2020 Matthias Bach <ma...@marix.org>.
 #
 # All modifications and additions to the file contributed by third parties
@@ -30,6 +30,7 @@
 Patch0:         python-ntfy-no-mock.patch
 Patch1:         emoji-2.0-compatibility.patch
 Patch2:         drop-misleading-shebangs.patch
+Patch3:         python-311-compat.patch
 BuildRequires:  %{python_module appdirs}
 # test requirements
 BuildRequires:  %{python_module emoji >= 1.6.2}

++++++ python-311-compat.patch ++++++
From: Matthias Bach <ma...@marix.org>
Date: Sat, 7 Jan 2023 15:15:25 +0100
Subject: [PATCH] Fix compatibility with Python 3.11
References: https://github.com/dschep/ntfy/issues/257
Upstream: submitted

We had still been using the function inspect.getargspec() that had
already been deprecated in Python 3.0.

Switching to the equivalent inspect.getfullargspec() breaks
compabitility with Python 2. However, as Python 2 is long dead we don't
care about that.
---
 ntfy/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ntfy/__init__.py b/ntfy/__init__.py
index 0fa7a22..6ed0abb 100644
--- a/ntfy/__init__.py
+++ b/ntfy/__init__.py
@@ -3,7 +3,7 @@ from getpass import getuser
 from os import getcwd, path, name
 from socket import gethostname
 from importlib import import_module
-from inspect import getargspec
+from inspect import getfullargspec
 from .backends.default import DefaultNotifierError
 
 __version__ = '2.7.0'
@@ -65,7 +65,7 @@ def notify(message, title, config=None, **kwargs):
                 notifier = e.module
                 e = e.exception
 
-            args, _, _, defaults = getargspec(notifier.notify)
+            args, _, _, defaults, *_ = getfullargspec(notifier.notify)
             possible_args = set(args)
             required_args =  set(args) if defaults is None else 
set(args[:-len(defaults)])
             required_args -= set(['title', 'message', 'retcode'])
-- 
2.35.3

Reply via email to