Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 781935 - dev-python/paramiko-2.7.2: Should depend on dev-python/gssapi (AttributeError: module 'gssapi' has no attribute 'exceptions')
Summary: dev-python/paramiko-2.7.2: Should depend on dev-python/gssapi (AttributeError...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-10 08:41 UTC by Bernd Feige
Modified: 2021-04-10 14:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Feige 2021-04-10 08:41:13 UTC
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
Comment 1 Ionen Wolkens gentoo-dev 2021-04-10 09:31:19 UTC
Sounds strange, importing is fine without gssapi here (test suite passes without it too).

Maybe missing something to make it behave this way?
Comment 2 Bernd Feige 2021-04-10 14:16:44 UTC
(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.