From: Skyler Dong Date: Sun, 16 Aug 2020 05:33:46 +0000 (-0500) Subject: Fix #1146 Set default allow_redirects to true (#1183) X-Git-Tag: 0.14.2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a226c60861f651b9874e31e66b3bb7f0db46c96d;p=thirdparty%2Fhttpx.git Fix #1146 Set default allow_redirects to true (#1183) * Set default allow_redirects to true * Set default allow_redirects to true * Fix line-too-long linting error by removing comments --- diff --git a/httpx/_api.py b/httpx/_api.py index a300f633..4c608f06 100644 --- a/httpx/_api.py +++ b/httpx/_api.py @@ -214,7 +214,7 @@ def head( headers: HeaderTypes = None, cookies: CookieTypes = None, auth: AuthTypes = None, - allow_redirects: bool = False, # Note: Differs to usual default. + allow_redirects: bool = True, cert: CertTypes = None, verify: VerifyTypes = True, timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG, diff --git a/httpx/_client.py b/httpx/_client.py index e3b2f5b3..53d52e51 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -849,7 +849,7 @@ class Client(BaseClient): headers: HeaderTypes = None, cookies: CookieTypes = None, auth: typing.Union[AuthTypes, UnsetType] = UNSET, - allow_redirects: bool = False, # NOTE: Differs to usual default. + allow_redirects: bool = True, timeout: typing.Union[TimeoutTypes, UnsetType] = UNSET, ) -> Response: """ @@ -1453,7 +1453,7 @@ class AsyncClient(BaseClient): headers: HeaderTypes = None, cookies: CookieTypes = None, auth: typing.Union[AuthTypes, UnsetType] = UNSET, - allow_redirects: bool = False, # NOTE: Differs to usual default. + allow_redirects: bool = True, timeout: typing.Union[TimeoutTypes, UnsetType] = UNSET, ) -> Response: """