Installation depends on requests package

Bug #1696021 reported by Stefan Wrobel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ssh-import-id
Fix Released
Medium
Scott Moser

Bug Description

I'm relatively new to Python, so my understanding might be lacking, but it seems that setup.py imports the whole library, which in turn depends on requests. Even if requests is earlier in requirements.txt, pip3 install will fail with "ModuleNotFoundError: No module named 'requests'"

See:
https://github.com/dustinkirkland/ssh-import-id/blob/master/setup.py#L20
https://github.com/dustinkirkland/ssh-import-id/blob/master/ssh_import_id/__init__.py

Similar to:
https://github.com/thiagofa/pysendy/pull/1

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hmm, what's your proposed solution? Can you propose a patch?

Changed in ssh-import-id:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Stefan Wrobel (swrobel) wrote :

Since the issue seems to be the same as it was for pysendy, where the version is being grabbed from __init__.py, you can either hardcode it in setup.py or add another version.py file that simply contains the version number and import that in both places. Unfortunately I have no idea how to submit a patch here...

See: https://github.com/thiagofa/pysendy/pull/1/files

Revision history for this message
Scott Moser (smoser) wrote :

I've fixed this in setup.py now, somewhat hackily.
but basically we avoid importing ssh_import_id, but directly import version.

please let me know if it is not working for you.

Changed in ssh-import-id:
status: Incomplete → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote :

This bug is fixed in the 5.8 release.

Changed in ssh-import-id:
assignee: nobody → Scott Moser (smoser)
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.