Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpx 0.24 documentation issue for netrc support #2666

Closed
tomchristie opened this issue Apr 18, 2023 Discussed in #2665 · 0 comments · Fixed by #2667
Closed

httpx 0.24 documentation issue for netrc support #2666

tomchristie opened this issue Apr 18, 2023 Discussed in #2665 · 0 comments · Fixed by #2667
Labels
bug Something isn't working

Comments

@tomchristie
Copy link
Member

tomchristie commented Apr 18, 2023

Thanks to @alexprengere for raising this issue...

Discussed in #2665

Originally posted by alexprengere April 18, 2023
From the docs: https://www.python-httpx.org/advanced/#netrc-support

>>> auth = httpx.NetRCAuth()
>>> client = httpx.Client(auth=auth)

Using that snippet will yield the error:

>>> httpx.NetRCAuth()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: NetRCAuth.__init__() missing 1 required positional argument: 'file'

Using NetRCAuth(file=None) fixes the issue, and produces the expected behavior, but perhaps it should be made the default value (I can open a PR).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant