forked from pool/python-libusb1
Accepting request 1239517 from home:glaubitz:branches:devel:languages:python
- Update to 3.2.0 * Add example for scanning the complete device tree * Fix CRLF problem * testUSB1: Fix python 3.13 support - Drop py313.patch, merged upstream OBS-URL: https://build.opensuse.org/request/show/1239517 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libusb1?expand=0&rev=13
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ee9b0a55f8bd0b3ea7017ae919a6c1f439af742c4a4b04543c5fd7af89b828c
|
||||
size 83013
|
||||
3
libusb1-3.2.0.tar.gz
Normal file
3
libusb1-3.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a11a6095e718cd49418a96329314da271cca6be7b4317a142724523371ac8961
|
||||
size 105601
|
||||
57
py313.patch
57
py313.patch
@@ -1,57 +0,0 @@
|
||||
From e8fdf43ff4b0ba55edbbb83a6822d62f0f755e64 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Damhet <xdbob@xdbob.net>
|
||||
Date: Tue, 13 Aug 2024 17:22:01 +0200
|
||||
Subject: [PATCH] testUSB1: fix python 3.13 support
|
||||
|
||||
PEP 667[1] makes all calls to `locals()` return a snapshot of the local
|
||||
context. Fix the tests by removing the `local_dict` variable and keep
|
||||
looking at the latest `locals()` state.
|
||||
|
||||
[1]: https://peps.python.org/pep-0667/
|
||||
|
||||
Signed-off-by: Antoine Damhet <xdbob@xdbob.net>
|
||||
---
|
||||
usb1/testUSB1.py | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/usb1/testUSB1.py b/usb1/testUSB1.py
|
||||
index ce33031..cc5503d 100644
|
||||
--- a/usb1/testUSB1.py
|
||||
+++ b/usb1/testUSB1.py
|
||||
@@ -278,15 +278,14 @@ def testDefaultEnumScope(self):
|
||||
"""
|
||||
ENUM_NAME = 'THE_ANSWER'
|
||||
ENUM_VALUE = 42
|
||||
- local_dict = locals()
|
||||
global_dict = globals()
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), None)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), None)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), None)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
# pylint: disable=unused-variable
|
||||
TEST_ENUM = libusb1.Enum({ENUM_NAME: ENUM_VALUE})
|
||||
# pylint: enable=unused-variable
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), ENUM_VALUE)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), ENUM_VALUE)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), None)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
|
||||
@@ -296,16 +295,15 @@ def testExplicitEnumScope(self):
|
||||
"""
|
||||
ENUM_NAME = 'THE_ANSWER'
|
||||
ENUM_VALUE = 42
|
||||
- local_dict = locals()
|
||||
global_dict = globals()
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), None)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), None)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), None)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
# pylint: disable=unused-variable
|
||||
TEST_ENUM = libusb1.Enum({ENUM_NAME: ENUM_VALUE}, global_dict)
|
||||
# pylint: enable=unused-variable
|
||||
try:
|
||||
- self.assertEqual(local_dict.get(ENUM_NAME), None)
|
||||
+ self.assertEqual(locals().get(ENUM_NAME), None)
|
||||
self.assertEqual(global_dict.get(ENUM_NAME), ENUM_VALUE)
|
||||
self.assertEqual(getattr(libusb1, ENUM_NAME, None), None)
|
||||
finally:
|
||||
@@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 22 12:50:43 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 3.2.0
|
||||
* Add example for scanning the complete device tree
|
||||
* Fix CRLF problem
|
||||
* testUSB1: Fix python 3.13 support
|
||||
- Drop py313.patch, merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 2 12:43:40 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-libusb1
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python-libusb1
|
||||
Version: 3.1.0
|
||||
Version: 3.2.0
|
||||
Release: 0
|
||||
Summary: Python wrapper for libusb-1.0
|
||||
# Relicensed from GPL to LGPLv2.1+ in May 2015
|
||||
@@ -25,8 +25,6 @@ Summary: Python wrapper for libusb-1.0
|
||||
License: LGPL-2.1-or-later
|
||||
URL: https://github.com/vpelletier/%{name}
|
||||
Source: https://files.pythonhosted.org/packages/source/l/libusb1/libusb1-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/vpelletier/python-libusb1/pull/104 testUSB1: fix python 3.13 support
|
||||
Patch: py313.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libusb-1_0-0 >= 1.0.21
|
||||
|
||||
Reference in New Issue
Block a user