Module 'httpx' has no attribute 'BasicAuthentication' - Documentation is not up-to-date
lsabi opened this issue · 1 comments
lsabi commented
When following the docs
https://www.python-httpx.org/advanced/authentication/
The BasicAuthentication
example gives the error below
auth = httpx.BasicAuthentication(username=settings.user, password=settings.password)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'httpx' has no attribute 'BasicAuthentication'
code is
import httpx
...
auth = httpx.BasicAuthentication(username=settings.user, password=settings.password)
Code that should be changed in the docs is below
auth = httpx.BasicAuth(username=settings.user, password=settings.password)
tomchristie commented
Thanks, latest release has been published and this is now resolved.