- Notifications
You must be signed in to change notification settings - Fork5.7k
Description
Issue I am facing
So httpx reads important optionsfrom environment variables (SSL settings, HTTP proxying). This is default behavior that can be disabled by passingtrust_env=False
when instantiatinghttpx.Client
.
telegram.request.HTTPXRequest
(that manageshttpx.Client
) doesn't do that and doesn't expose a way to do that.
I considered writing custom implementation oftelegram.request.BaseRequest
, replicatingHTTPXRequest
's interface. That's not ideal because it is not possible to implement the same interface without using undocumented/poorly documented features of httpx (whichHTTPXRequest
uses, specifically to passsocket_options
and some other options).
I don't really understand how this is supposed to be handled without making an implementation inferior, so this issue is marked as question.
Traceback to the issue
No response
Related part of your code
No response
Operating System
Windows 10
Version of Python, python-telegram-bot & dependencies
python-telegram-bot 21.4Bot API 7.7Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]