Skip to content

http_client docstring does not say that timeout, verify and proxies only configure the default session #960

Description

The http_client paragraph of ClientApplication.__init__ (msal/application.py:496-502 on dev) explains retries but says nothing about timeout, verify and proxies. Those three parameters each carry "This does not apply if you have chosen to pass your own Http client" (lines 508, 513, 518), so the information exists, but only if you read those three entries; someone reading the http_client docs to decide whether to pass one does not see it.

The behaviour itself is as documented: timeout is applied with functools.partial on the session MSAL builds (application.py:702-713) and a custom client is wrapped in ThrottledHttpClient untouched. Checked on 1.38.0 with a recording fake client: its request receives no timeout kwarg, while the default session's request is a partial with timeout=5.

Proposal: one sentence in the http_client paragraph pointing at the three parameters. PR follows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions