Bug 2154193

Summary: libssh2-python: Unusable with Python 3
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: libssh2-pythonAssignee: Orphan Owner <extras-orphan>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: clalancette
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-26 09:30:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137512    

Description Florian Weimer 2022-12-16 09:18:57 UTC
>>> import libssh2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib64/python3.11/site-packages/libssh2.cpython-311-x86_64-linux-gnu.so: undefined symbol: PyCObject_FromVoidPtr

This shows up during the build as well:

src/ssh2.c: In function ‘PyInit_libssh2’:
src/ssh2.c:71:24: warning: implicit declaration of function ‘PyCObject_FromVoidPtr’; did you mean ‘PyLong_FromVoidPtr’? [-Wimplicit-function-declaration]
   71 |         c_api_object = PyCObject_FromVoidPtr((void *)SSH2_API, NULL);
      |                        ^~~~~~~~~~~~~~~~~~~~~
      |                        PyLong_FromVoidPtr
src/ssh2.c:71:22: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   71 |         c_api_object = PyCObject_FromVoidPtr((void *)SSH2_API, NULL);
      |                      ^

And even the first build with a supposed Python 3 port (libssh2-python-0.7.1-18.fc27) suffered from this, according to the Koji build logs.

The package will stop building once the Fedora compiler no longer accepts implicit function declarations.

Given the package is unusable, and no one has noticed in five years, it should probably just be retired.

Comment 1 Ben Cotton 2023-02-07 15:00:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 2 Fedora Admin user for bugzilla script actions 2023-09-05 00:11:26 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 3 Miro Hrončok 2023-09-26 09:30:49 UTC
Automation has figured out the package is retired in rawhide.

If you like it to be unretired, please open a ticket at https://pagure.io/releng/new_issue?template=package_unretirement