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

Open
#960 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 7 days

@HardMax71 is already working on this.

Since Sep 10, 2026.

  • #961 by @HardMax71 — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Read the http_client paragraph in msal/application.py at lines 496–502, then compare it with the timeout, verify and proxies parameter notes at lines 508, 513 and 518. Add one sentence pointing readers to those parameters, and check that the paragraph makes clear they configure only the default session. A linked open pull request already addresses this issue.

Written by the indexing model from the issue text.

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.

Dominant language
Python
Stars
971
Forks
223
Avg merge
4d 2h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AzureAD/microsoft-authentication-library-for-python

All issues in AzureAD/microsoft-authentication-library-for-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.