diff --git a/py311-compat.patch b/py311-compat.patch new file mode 100644 index 0000000..5740d8d --- /dev/null +++ b/py311-compat.patch @@ -0,0 +1,22 @@ +Index: vncdotool-1.0.0/tests/unit/helpers.py +=================================================================== +--- vncdotool-1.0.0.orig/tests/unit/helpers.py ++++ vncdotool-1.0.0/tests/unit/helpers.py +@@ -1,5 +1,7 @@ + import sys +-from unittest.mock import Mock, _importer ++import pkgutil ++from unittest.mock import Mock ++ + from functools import wraps + + class _isolate(object): +@@ -102,7 +104,7 @@ def isolate(target, excludes=None): + + ``isolate`` borrows heavily from DingusTestCase. + """ +- target = _importer(target) ++ target = pkgutil.resolve_name(target) + return _isolate(target, excludes) + + diff --git a/python-vncdotool.changes b/python-vncdotool.changes index a5b9bb9..0d017e5 100644 --- a/python-vncdotool.changes +++ b/python-vncdotool.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 12 11:44:38 UTC 2023 - Daniel Garcia + +- Add py311-compat.patch to make it compatible with python 3.11 + gh#python/cpython#88852 + ------------------------------------------------------------------- Wed May 4 08:11:19 UTC 2022 - pgajdos@suse.com diff --git a/python-vncdotool.spec b/python-vncdotool.spec index 363e511..968c443 100644 --- a/python-vncdotool.spec +++ b/python-vncdotool.spec @@ -1,7 +1,7 @@ # # spec file for package python-vncdotool # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-vncdotool Version: 1.0.0 @@ -29,6 +28,8 @@ Patch0: remove-nose.patch Patch1: fix-mocking.patch # https://github.com/sibson/vncdotool/issues/218 Patch2: python-vncdotool-no-mock.patch +# gh#python/cpython#88852 +Patch3: py311-compat.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -81,6 +82,7 @@ Command line VNC client. %python_alternative %{_bindir}/vncdo %python_alternative %{_bindir}/vncdotool %python_alternative %{_bindir}/vnclog -%{python_sitelib}/* +%{python_sitelib}/vncdotool +%{python_sitelib}/vncdotool-%{version}*-info %changelog