jenkins-bot has submitted this change and it was merged.
Change subject: Reimplement Http basic authentication ......................................................................
Reimplement Http basic authentication
Bug: T101494 Change-Id: I784bb1f8c893d02df6dfad5ae80942f6b1f944c9 --- M pywikibot/comms/http.py 1 file changed, 4 insertions(+), 3 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index a6ed6a8..6c35fe3 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -252,14 +252,15 @@ uri = http_request.uri body = http_request.body headers = http_request.headers + auth = config.authenticate.get(requests.utils.urlparse(uri).netloc, None) timeout = config.socket_timeout try: - request = session.request(method, uri, data=body, headers=headers, - verify=True, timeout=timeout) + response = session.request(method, uri, data=body, headers=headers, + auth=auth, timeout=timeout, verify=True) except Exception as e: http_request.data = e else: - http_request.data = request + http_request.data = response
def error_handling_callback(request):