Closed andrefloriani closed 1 year ago
Hi @andrefloriani Andre, apologies that it took so long to reply to this issue.
Good suggestion, we're going to add an option for this soon.
This is implemented in v1.14.0.
Please be aware that we didn't implement the path verification like you have in your suggestion -- we preferred to pass the user-argument directly to requests so long as it is not None
.
In enterprise environments it is usual to have custom "Intermediate certificates" from different data security implementations, such as ZScaler, and will cause any requests to the DeepL engine to fail due to SSL verification error.
Usually these certificates are retrievable from the local OS (Windows Certificates Store or Linux/Mac certs file).
This suggestion adds a new parameter to the
Translator
andHttpClient
classes enabling the user to pass it to theverify
argument of therequests.Session
object.Note: setting the environment variables
REQUESTS_CA_BUNDLE
orCURL_CA_BUNDLE
does not solve the issue, asrequests.Session.send
andrequests.Session.__init__
currently ignore OS environment variables. They are only considered in direct requests without a Session viarequests.request
and its dependant functions such asrequests.get
,requests.post
, etc.Modifications to
translator.py
>Translator.__init__
:Modifications to
http_client.py
>HttpClient.__init__
: