Hello,
I’m really interested in using pysonar, but it depends on requests, which itself relies on certifi as a root certificate store.
This causes issues in corporate environments (such as mine) where self-signed system certificates must be used to secure connections to self-hosted services such as SonarQube Server.
truststore seems like a good candidate as it is already widely used within the Python community:
-
pip vendors truststore since 2022: it has been the default behavior since 2024 (pip v24.2),
-
popular HTTP clients depend on truststore: httpx2, niquests.
It is maintained by Seth Larson, Python core developer and Security Developer at the Python Software Foundation.
truststore depends on Python 3.10 and so does pysonar.
Instead of using requests.get, pysonar would have to use a requests.Session instance, create an HTTP adapter using SSL context from truststore, and mount it using requests.Session.mount (see pip/src/pip/_internal/network/session.py for reference).
I would really enjoy using pysonar and I hope that you will be interested in this suggestion!