[packages/python3-mysql-connector] Fix tests

arekm arekm at pld-linux.org
Tue Sep 1 17:06:21 CEST 2026


commit f8b208430573277afc214a8ef6305d7ebc23f7af
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Sep 1 17:06:08 2026 +0200

    Fix tests

 tests-webauthn-probe.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
---
diff --git a/tests-webauthn-probe.patch b/tests-webauthn-probe.patch
new file mode 100644
index 0000000..f85bbd0
--- /dev/null
+++ b/tests-webauthn-probe.patch
@@ -0,0 +1,40 @@
+The plugin availability probe only checks that the fido2 package imports, but
+the WebAuthn plugin needs the 1.x API (fido2.cbor.dump_bytes and friends) and
+raises ProgrammingError on a 2.x fido2. Import the plugin itself, the way the
+kerberos probe just above already does, so an unusable fido2 counts as absent
+instead of erroring out the whole testcase.
+
+--- a/mysql-connector-python/tests/test_authentication.py
++++ b/mysql-connector-python/tests/test_authentication.py
+@@ -77,8 +77,13 @@
+ 
+ try:
+     import fido2
+-except ImportError:
++
++    from mysql.connector.plugins.authentication_webauthn_client import (
++        MySQLWebAuthnAuthPlugin,
++    )
++except (ImportError, ProgrammingError):
+     fido2 = None
++    MySQLWebAuthnAuthPlugin = None
+ 
+ try:
+     from mysql.connector.connection_cext import HAVE_CMYSQL, CMySQLConnection
+--- a/mysql-connector-python/tests/test_aio_authentication.py
++++ b/mysql-connector-python/tests/test_aio_authentication.py
+@@ -81,8 +81,13 @@
+ 
+ try:
+     import fido2
+-except ImportError:
++
++    from mysql.connector.plugins.authentication_webauthn_client import (
++        MySQLWebAuthnAuthPlugin,
++    )
++except (ImportError, ProgrammingError):
+     fido2 = None
++    MySQLWebAuthnAuthPlugin = None
+ 
+ try:
+     from mysql.connector.aio.connection_cext import HAVE_CMYSQL, CMySQLConnection
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-mysql-connector.git/commitdiff/f8b208430573277afc214a8ef6305d7ebc23f7af



More information about the pld-cvs-commit mailing list