Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:branches:openSUSE:Factory:Rings:1-MinimalX
python-pyu2f
fix-deprecation-warning.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-deprecation-warning.patch of Package python-pyu2f
From 5e2f862dd5ba61eadff341dbf0a1202e91b1b145 Mon Sep 17 00:00:00 2001 From: Cary Zhao <zhaosukima@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(-) Index: pyu2f-0.1.5a/pyu2f/hid/macos.py =================================================================== --- pyu2f-0.1.5a.orig/pyu2f/hid/macos.py +++ pyu2f-0.1.5a/pyu2f/hid/macos.py @@ -174,7 +174,7 @@ if sys.platform.startswith('darwin'): ctypes.POINTER(ctypes.c_uint8), CF_INDEX] else: - logger.warn('Not running on MacOS') + logger.warning('Not running on MacOS') def CFStr(s): Index: pyu2f-0.1.5a/pyu2f/tests/hid/linux_test.py =================================================================== --- pyu2f-0.1.5a.orig/pyu2f/tests/hid/linux_test.py +++ pyu2f-0.1.5a/pyu2f/tests/hid/linux_test.py @@ -49,14 +49,14 @@ KEYBOARD_RD = ( 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 @@ class FakeDeviceOsModule(object): 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',
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor