Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pyu2f for openSUSE:Factory checked in at 2022-11-01 16:10:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pyu2f (Old) and /work/SRC/openSUSE:Factory/.python-pyu2f.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyu2f" Tue Nov 1 16:10:37 2022 rev:3 rq:1032664 version:0.1.5a Changes: -------- --- /work/SRC/openSUSE:Factory/python-pyu2f/python-pyu2f.changes 2022-04-14 17:23:47.779146335 +0200 +++ /work/SRC/openSUSE:Factory/.python-pyu2f.new.2275/python-pyu2f.changes 2022-11-01 16:10:40.926467982 +0100 @@ -1,0 +2,5 @@ +Tue Nov 1 09:26:18 UTC 2022 - Mark??ta Machov?? <mmach...@suse.com> + +- Add upstream fix-deprecation-warning.patch to fix compatibility + +------------------------------------------------------------------- New: ---- fix-deprecation-warning.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pyu2f.spec ++++++ --- /var/tmp/diff_new_pack.gTrbbd/_old 2022-11-01 16:10:41.466470627 +0100 +++ /var/tmp/diff_new_pack.gTrbbd/_new 2022-11-01 16:10:41.470470646 +0100 @@ -24,6 +24,8 @@ License: Apache-2.0 URL: https://github.com/google/pyu2f/ Source: https://github.com/google/pyu2f/archive/refs/tags/%{version}.tar.gz#/pyu2f-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/google/pyu2f/pull/32 fix DeprecationWarning for logging and fake_filesystem +Patch: fix-deprecation-warning.patch BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros # SECTION test requirements @@ -40,7 +42,7 @@ U2F host library for interacting with a U2F device over USB. %prep -%setup -q -n pyu2f-%{version} +%autosetup -p1 -n pyu2f-%{version} sed -i 's/import mock/from unittest import mock/' pyu2f/tests/*_test.py pyu2f/tests/hid/*_test.py %build ++++++ fix-deprecation-warning.patch ++++++ >From 5e2f862dd5ba61eadff341dbf0a1202e91b1b145 Mon Sep 17 00:00:00 2001 From: Cary Zhao <zhaosuk...@gmail.com> Date: Mon, 22 Nov 2021 10:42:06 -0800 Subject: [PATCH] fix DeprecationWarning for logging and fake_filesystem --- pyu2f/hid/macos.py | 2 +- pyu2f/tests/hid/linux_test.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyu2f/hid/macos.py b/pyu2f/hid/macos.py index 905bce2..919fd4d 100644 --- a/pyu2f/hid/macos.py +++ b/pyu2f/hid/macos.py @@ -174,7 +174,7 @@ class _CFAllocator(_CFType): ctypes.POINTER(ctypes.c_uint8), CF_INDEX] else: - logger.warn('Not running on MacOS') + logger.warning('Not running on MacOS') def CFStr(s): diff --git a/pyu2f/tests/hid/linux_test.py b/pyu2f/tests/hid/linux_test.py index 1a299fa..610d200 100644 --- a/pyu2f/tests/hid/linux_test.py +++ b/pyu2f/tests/hid/linux_test.py @@ -49,14 +49,14 @@ def AddDevice(fs, dev_name, product_name, vendor_id, product_id, report_descriptor_b64): - uevent = fs.CreateFile('/sys/class/hidraw/%s/device/uevent' % dev_name) - rd = fs.CreateFile('/sys/class/hidraw/%s/device/report_descriptor' % dev_name) + uevent = fs.create_file('/sys/class/hidraw/%s/device/uevent' % dev_name) + rd = fs.create_file('/sys/class/hidraw/%s/device/report_descriptor' % dev_name) report_descriptor = base64.b64decode(report_descriptor_b64) - rd.SetContents(report_descriptor) + rd.set_contents(report_descriptor) buf = 'HID_NAME=%s\n' % product_name.encode('utf8') buf += 'HID_ID=0001:%08X:%08X\n' % (vendor_id, product_id) - uevent.SetContents(buf) + uevent.set_contents(buf) class FakeDeviceOsModule(object): @@ -79,10 +79,10 @@ def read(self, unused_dev, unused_length): # pylint: disable=invalid-name class LinuxTest(unittest.TestCase): def setUp(self): self.fs = fake_filesystem.FakeFilesystem() - self.fs.CreateDirectory('/sys/class/hidraw') + self.fs.create_dir('/sys/class/hidraw') def tearDown(self): - self.fs.RemoveObject('/sys/class/hidraw') + self.fs.remove_object('/sys/class/hidraw') def testCallEnumerate(self): AddDevice(self.fs, 'hidraw1', 'Logitech USB Keyboard',