Yubico / yubikey-manager

Python library and command line tool for configuring any YubiKey over all USB interfaces.
https://developers.yubico.com/yubikey-manager/
BSD 2-Clause "Simplified" License
861 stars 125 forks source link

In python: 'SmartCardConnection' is not declared in __all__ #622

Open RunYouCleverBoy opened 1 month ago

RunYouCleverBoy commented 1 month ago

Slows on PyCharm.

Steps to reproduce Simply

  1. create a new project
  2. pip install yubikey-manager
  3. in the python file :
    from yubikit.core.smartcard import SmartCardConnection
  4. It is necessary for the use of piv:
    with self.device.open_connection(SmartCardConnection) as conn:
    piv = PivSession(conn)
    ...

    Apparently, SmartCardConnection is not "exported to the world" because it does not appear in __all__.

Your all is defined:

__all__ = ["ApduError", "ApduFormat", "SW", "AID"]

Thanks 🙇

dainnilsson commented 1 month ago

Thanks, this will be addressed in the next version.