public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-fido2] rawhide: Update to v2.2.1
@ 2026-07-02 14:08 Jeremy Cline
0 siblings, 0 replies; only message in thread
From: Jeremy Cline @ 2026-07-02 14:08 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-fido2
Branch : rawhide
Commit : da684c4aff533d8b0956fc1022792b284e3d212d
Author : Jeremy Cline <jeremycline@microsoft.com>
Date : 2026-07-02T10:05:17-04:00
Stats : +4/-118 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/python-fido2/c/da684c4aff533d8b0956fc1022792b284e3d212d?branch=rawhide
Log:
Update to v2.2.1
Tests now depend on pyscard, so that's added as an optional build
dependency.
In a follow-up update, we might want to consider mapping that dependency
into RPM language. I _think_ it's the same thing as described in the
Python "Extras" section of the packaging guideline, but I'm not sure.
---
diff --git a/.gitignore b/.gitignore
index d436b26..ad358f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@
/python-fido2-1.2.0.tar.gz
/python-fido2-2.0.0.tar.gz
/python-fido2-2.1.1.tar.gz
+/python-fido2-2.2.1.tar.gz
diff --git a/4279fd9039040ae49bf2227968d02939d0e812c9.patch b/4279fd9039040ae49bf2227968d02939d0e812c9.patch
deleted file mode 100644
index f1ce415..0000000
--- a/4279fd9039040ae49bf2227968d02939d0e812c9.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 4279fd9039040ae49bf2227968d02939d0e812c9 Mon Sep 17 00:00:00 2001
-From: Dain Nilsson <dain@yubico.com>
-Date: Tue, 10 Mar 2026 15:15:00 +0100
-Subject: [PATCH] Fix str() representation of enums broken by 3.15
-
----
- fido2/mds3.py | 6 +++---
- fido2/webauthn.py | 44 +++++++++++++++++++++++++-------------------
- 2 files changed, 28 insertions(+), 22 deletions(-)
-
-diff --git a/fido2/mds3.py b/fido2/mds3.py
-index 840c0ae0..0926fa5e 100644
---- a/fido2/mds3.py
-+++ b/fido2/mds3.py
-@@ -33,7 +33,7 @@
- from contextvars import ContextVar
- from dataclasses import dataclass, field
- from datetime import date
--from enum import Enum, unique
-+from enum import unique
- from typing import Any, Callable, Mapping, Sequence
-
- from cryptography import x509
-@@ -47,7 +47,7 @@
- )
- from .cose import CoseKey
- from .utils import _JsonDataObject, websafe_decode
--from .webauthn import Aaguid, AttestationObject
-+from .webauthn import Aaguid, AttestationObject, _StringEnum
-
- logger = logging.getLogger(__name__)
-
-@@ -144,7 +144,7 @@ class EcdaaTrustAnchor(_JsonDataObject):
-
-
- @unique
--class AuthenticatorStatus(str, Enum):
-+class AuthenticatorStatus(_StringEnum):
- """Status of an Authenticator."""
-
- NOT_FIDO_CERTIFIED = "NOT_FIDO_CERTIFIED"
-diff --git a/fido2/webauthn.py b/fido2/webauthn.py
-index 488a3d4a..9100c779 100644
---- a/fido2/webauthn.py
-+++ b/fido2/webauthn.py
-@@ -341,10 +341,33 @@ def from_ctap1(cls, app_param: bytes, registration) -> AttestationObject:
- )
-
-
-+class _StringEnumMeta(EnumMeta):
-+ def _get_value(cls, value):
-+ return None
-+
-+ def __call__(cls, value, *args, **kwargs): # type: ignore
-+ try:
-+ return super().__call__(value, *args, **kwargs)
-+ except ValueError:
-+ return cls._get_value(value)
-+
-+
-+# TODO: Python 3.11 use StrEnum, instead of "str, Enum" remove custom __str__().
-+class _StringEnum(str, Enum, metaclass=_StringEnumMeta):
-+ """Enum of strings for WebAuthn types.
-+
-+ Unrecognized values are treated as missing.
-+ """
-+
-+ # Needed in Python 3.15, can be removed when StrEnum is available.
-+ def __str__(self):
-+ return self.value
-+
-+
- @dataclass(init=False, frozen=True)
- class CollectedClientData(bytes):
- @unique
-- class TYPE(str, Enum):
-+ class TYPE(_StringEnum):
- CREATE = "webauthn.create"
- GET = "webauthn.get"
-
-@@ -376,6 +399,7 @@ def create(
- encoded_challenge = websafe_encode(challenge)
- else:
- encoded_challenge = challenge
-+
- return cls(
- json.dumps(
- {
-@@ -401,24 +425,6 @@ def hash(self) -> bytes:
- return sha256(self)
-
-
--class _StringEnumMeta(EnumMeta):
-- def _get_value(cls, value):
-- return None
--
-- def __call__(cls, value, *args, **kwargs): # type: ignore
-- try:
-- return super().__call__(value, *args, **kwargs)
-- except ValueError:
-- return cls._get_value(value)
--
--
--class _StringEnum(str, Enum, metaclass=_StringEnumMeta):
-- """Enum of strings for WebAuthn types.
--
-- Unrecognized values are treated as missing.
-- """
--
--
- @unique
- class AttestationConveyancePreference(_StringEnum):
- NONE = "none"
diff --git a/python-fido2.spec b/python-fido2.spec
index 40b24e1..d36a4ad 100644
--- a/python-fido2.spec
+++ b/python-fido2.spec
@@ -1,7 +1,7 @@
%global srcname fido2
Name: python-%{srcname}
-Version: 2.1.1
+Version: 2.2.1
Release: %autorelease
Summary: Functionality for FIDO 2.0, including USB device communication
@@ -11,9 +11,6 @@ Summary: Functionality for FIDO 2.0, including USB device communication
License: BSD-2-Clause AND Apache-2.0 AND MPL-2.0
URL: https://github.com/Yubico/python-fido2
Source0: https://github.com/Yubico/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
-# Fix build with Python 3.15 - https://github.com/Yubico/python-fido2/issues/278
-# https://bugzilla.redhat.com/show_bug.cgi?id=2424579
-Patch: https://github.com/Yubico/python-fido2/commit/4279fd9039040ae49bf2227968d02939d0e812c9.patch
BuildArch: noarch
@@ -39,6 +36,7 @@ For usage, see the examples/ directory.
Summary: %summary
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-pytest
+BuildRequires: python3dist(pyscard)
%description -n python%{python3_pkgversion}-%{srcname} %_description
diff --git a/sources b/sources
index 47fc30c..1255a8d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (python-fido2-2.1.1.tar.gz) = ea7abe0950d95543e4ccf1ac15240a37f3aa0bdc2160975e71e8ee1779c834abbba8709d6fba787510fcf8d0502b1e2a45c96ea9d03d5c30f7d5004838eaa093
+SHA512 (python-fido2-2.2.1.tar.gz) = fcf00e7458083299b5e3a5b5be13b3139fc785408f64341cdd05717d40533659bb66d41db0a122536a824a8ec54f08255855c3656a428d4bcb5270dc696b7a5d
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-02 14:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-02 14:08 [rpms/python-fido2] rawhide: Update to v2.2.1 Jeremy Cline
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox