Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disabling direct access to environment variables bytelegram.HTTPXRequest #4424

@asrelo

Description

@asrelo

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)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp