FS#76648 - [python-requests] Missing python-certifi dependency

Attached to Project: Arch Linux
Opened by ChrisP (mastercaution) - Wednesday, 23 November 2022, 13:45 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 23 November 2022, 13:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
certifi is required by requests. If I uninstall python-certifi, some applications stop working, such as virt-manager and virt-install.

Additional info:
* package version: 2.28.1-1
* Traceback of virt-manager (4.1.0-1) (uses python-requests)
```
Traceback (most recent call last):
File "/usr/bin/virt-manager", line 6, in <module>
from virtManager import virtmanager
File "/usr/share/virt-manager/virtManager/virtmanager.py", line 19, in <module>
from virtinst import BuildConfig
File "/usr/share/virt-manager/virtinst/__init__.py", line 60, in <module>
from virtinst.install.installer import Installer
File "/usr/share/virt-manager/virtinst/install/installer.py", line 12, in <module>
from . import unattended
File "/usr/share/virt-manager/virtinst/install/unattended.py", line 18, in <module>
from . import urlfetcher
File "/usr/share/virt-manager/virtinst/install/urlfetcher.py", line 16, in <module>
import requests
File "/home/chrisp/.local/lib/python3.10/site-packages/requests/__init__.py", line 147, in <module>
from . import packages, utils
File "/home/chrisp/.local/lib/python3.10/site-packages/requests/utils.py", line 24, in <module>
from . import certs
File "/home/chrisp/.local/lib/python3.10/site-packages/requests/certs.py", line 14, in <module>
from certifi import where
ModuleNotFoundError: No module named 'certifi'
```
* python-certifi was an orphan (unused package) on my system
* I not an expert in python dependency management, but certifi is mentioned in the setup.cfg of requests

Steps to reproduce:
* remove python-certifi if installed (legal because it is not a dependency of the python-requests package)
* run `virt-manager`
* Returns with error: `ModuleNotFoundError: No module named 'certifi'`
This task depends upon

Closed by  Jan de Groot (JGC)
Wednesday, 23 November 2022, 13:59 GMT
Reason for closing:  Not a bug
Comment by Jan de Groot (JGC) - Wednesday, 23 November 2022, 13:58 GMT
This is not a bug. Your trace shows an installed module in /home/chrisp/.local, not the packaged module.

The packaged module has been patched to drop the dependency:
https://github.com/archlinux/svntogit-packages/blob/packages/python-requests/trunk/certs.patch

Loading...