Without dev-python/gssapi installed, just importing paramiko fails. This is because importing gssapi is catched and GSS_AUTH_AVAILABLE set to FALSE but this is not properly considered in parts of paramiko/ssh_gss.py. > ipython Python 3.9.4 (default, Apr 5 2021, 08:35:59) Type 'copyright', 'credits' or 'license' for more information IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help. [ins] In [1]: import paramiko --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-1-110cb50357c7> in <module> ----> 1 import paramiko /usr/lib/python3.9/site-packages/paramiko/__init__.py in <module> 20 import sys 21 from paramiko._version import __version__, __version_info__ ---> 22 from paramiko.transport import SecurityOptions, Transport 23 from paramiko.client import ( 24 SSHClient, /usr/lib/python3.9/site-packages/paramiko/transport.py in <module> 36 import paramiko 37 from paramiko import util ---> 38 from paramiko.auth_handler import AuthHandler 39 from paramiko.ssh_gss import GSSAuth 40 from paramiko.channel import Channel /usr/lib/python3.9/site-packages/paramiko/auth_handler.py in <module> 70 ) 71 from paramiko.server import InteractiveQuery ---> 72 from paramiko.ssh_gss import GSSAuth, GSS_EXCEPTIONS 73 74 /usr/lib/python3.9/site-packages/paramiko/ssh_gss.py in <module> 56 _API = "PYTHON-GSSAPI-NEW" 57 GSS_EXCEPTIONS = ( ---> 58 gssapi.exceptions.GeneralError, 59 gssapi.raw.misc.GSSError, 60 ) AttributeError: module 'gssapi' has no attribute 'exceptions' Reproducible: Always
Sounds strange, importing is fine without gssapi here (test suite passes without it too). Maybe missing something to make it behave this way?
(In reply to Ionen Wolkens from comment #1) > Sounds strange, importing is fine without gssapi here (test suite passes > without it too). > > Maybe missing something to make it behave this way? You're right - installed and uninstalled gssapi and cannot reproduce it any more. Marking "resolved", thanks.