public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Orion Poplawski <orion@nwra.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-fido2] epel10.2: Add patch for pyscard 2.2.2 support
Date: Fri, 21 Aug 2026 13:51:38 GMT	[thread overview]
Message-ID: <178732029853.1.2496803300399235843.rpms-python-fido2-3b21f6d9923a@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-fido2
Branch : epel10.2
Commit : 3b21f6d9923a0ab7fadc621929b423dd055c2bfe
Author : Orion Poplawski <orion@nwra.com>
Date   : 2026-08-20T22:06:37-06:00
Stats  : +44/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-fido2/c/3b21f6d9923a0ab7fadc621929b423dd055c2bfe?branch=epel10.2

Log:
Add patch for pyscard 2.2.2 support

---
diff --git a/0002-pyscard-2.2.2-support.patch b/0002-pyscard-2.2.2-support.patch
new file mode 100644
index 0000000..419d048
--- /dev/null
+++ b/0002-pyscard-2.2.2-support.patch
@@ -0,0 +1,43 @@
+From 2462fdfa5a01ea05b5d492a2e401ab174ec2b42d Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Thu, 20 Aug 2026 21:57:37 -0600
+Subject: [PATCH 2/2] pyscard 2.2.2 support
+
+---
+ fido2/pcsc.py | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/fido2/pcsc.py b/fido2/pcsc.py
+index a151449..8b62a45 100644
+--- a/fido2/pcsc.py
++++ b/fido2/pcsc.py
+@@ -34,7 +34,6 @@ from .utils import LOG_LEVEL_TRAFFIC
+ from smartcard import System
+ from smartcard.CardConnection import CardConnection
+ from smartcard.pcsc.PCSCExceptions import ListReadersException
+-from smartcard.pcsc.PCSCContext import PCSCContext
+ 
+ from threading import Event
+ from typing import Tuple, Optional, Callable, Iterator
+@@ -243,9 +242,15 @@ class CtapPcscDevice(CtapDevice):
+ def _list_readers():
+     try:
+         return System.readers()
+-    except ListReadersException:
++    except ListReadersException as e:
+         # If the PCSC system has restarted the context might be stale, try
+         # forcing a new context (This happens on Windows if the last reader is
+         # removed):
+-        PCSCContext.instance = None
+-        return System.readers()
++        try:
++            from smartcard.pcsc.PCSCContext import PCSCContext
++
++            PCSCContext.instance = None
++            return System.readers()
++        except ImportError:
++            # As of pyscard 2.2.2 the PCSCContext singleton has been removed
++            raise e
+-- 
+2.55.0
+

diff --git a/python-fido2.spec b/python-fido2.spec
index f279bdc..f83f9da 100644
--- a/python-fido2.spec
+++ b/python-fido2.spec
@@ -14,6 +14,7 @@ URL:            https://github.com/Yubico/python-fido2
 Source0:        https://github.com/Yubico/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
 # Fix build with cryptography 45+
 Patch0:         0001-cryptography-dep.patch
+Patch1:         0002-pyscard-2.2.2-support.patch
 
 BuildArch:      noarch
 

                 reply	other threads:[~2026-08-21 13:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178732029853.1.2496803300399235843.rpms-python-fido2-3b21f6d9923a@fedoraproject.org \
    --to=orion@nwra.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox