diff options
| author | Kenneth Reitz <me@kennethreitz.org> | 2019-08-20 00:11:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-20 00:11:02 -0400 |
| commit | 9bc49b596032749a02666ff0ca58acafc467d888 (patch) | |
| tree | 298c2c81562d58f9c0b6591c942e20237ac4fe10 /requests | |
| parent | 45c2e679e0923cd8519db31b31d0573928c6d1f4 (diff) | |
| parent | d79024f246d1037c4196da6027c2c2be08719c8d (diff) | |
| download | python-requests-9bc49b596032749a02666ff0ca58acafc467d888.tar.gz | |
Merge branch 'master' into patch-1
Diffstat (limited to 'requests')
| -rw-r--r-- | requests/api.py | 6 | ||||
| -rw-r--r-- | requests/auth.py | 2 | ||||
| -rw-r--r-- | requests/models.py | 4 | ||||
| -rw-r--r-- | requests/sessions.py | 4 | ||||
| -rw-r--r-- | requests/utils.py | 2 |
5 files changed, 10 insertions, 8 deletions
diff --git a/requests/api.py b/requests/api.py index ef71d075..88cfdceb 100644 --- a/requests/api.py +++ b/requests/api.py @@ -16,7 +16,7 @@ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. - :param method: method for the new :class:`Request` object. + :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``. :param url: URL for the new :class:`Request` object. :param params: (optional) Dictionary, list of tuples or bytes to send in the query string for the :class:`Request`. @@ -92,7 +92,9 @@ def head(url, **kwargs): r"""Sends a HEAD request. :param url: URL for the new :class:`Request` object. - :param \*\*kwargs: Optional arguments that ``request`` takes. + :param \*\*kwargs: Optional arguments that ``request`` takes. If + `allow_redirects` is not provided, it will be set to `False` (as + opposed to the default :meth:`request` behavior). :return: :class:`Response <Response>` object :rtype: requests.Response """ diff --git a/requests/auth.py b/requests/auth.py index 34e7c8b8..eeface39 100644 --- a/requests/auth.py +++ b/requests/auth.py @@ -239,7 +239,7 @@ class HTTPDigestAuth(AuthBase): """ # If response is not 4xx, do not auth - # See https://github.com/requests/requests/issues/3772 + # See https://github.com/psf/requests/issues/3772 if not 400 <= r.status_code < 500: self._thread_local.num_401_calls = 1 return r diff --git a/requests/models.py b/requests/models.py index 62dcd0b7..457b8412 100644 --- a/requests/models.py +++ b/requests/models.py @@ -12,7 +12,7 @@ import sys # Import encoding now, to avoid implicit import later. # Implicit import within threads may cause LookupError when standard library is in a ZIP, -# such as in Embedded Python. See https://github.com/requests/requests/issues/3578. +# such as in Embedded Python. See https://github.com/psf/requests/issues/3578. import encodings.idna from urllib3.fields import RequestField @@ -358,7 +358,7 @@ class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): #: We're unable to blindly call unicode/str functions #: as this will include the bytestring indicator (b'') #: on python 3.x. - #: https://github.com/requests/requests/pull/2238 + #: https://github.com/psf/requests/pull/2238 if isinstance(url, bytes): url = url.decode('utf8') else: diff --git a/requests/sessions.py b/requests/sessions.py index 1043d513..b8a123dd 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -192,9 +192,9 @@ class SessionRedirectMixin(object): self.rebuild_method(prepared_request, resp) - # https://github.com/requests/requests/issues/1084 + # https://github.com/psf/requests/issues/1084 if resp.status_code not in (codes.temporary_redirect, codes.permanent_redirect): - # https://github.com/requests/requests/issues/3490 + # https://github.com/psf/requests/issues/3490 purged_headers = ('Content-Length', 'Content-Type', 'Transfer-Encoding') for header in purged_headers: prepared_request.headers.pop(header, None) diff --git a/requests/utils.py b/requests/utils.py index 8170a8d2..28c9366e 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -179,7 +179,7 @@ def get_netrc_auth(url, raise_errors=False): except KeyError: # os.path.expanduser can fail when $HOME is undefined and # getpwuid fails. See https://bugs.python.org/issue20164 & - # https://github.com/requests/requests/issues/1846 + # https://github.com/psf/requests/issues/1846 return if os.path.exists(loc): |
