Skip to content
Myr

Merge branch 'master' into master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Denis Belavin · committed by GitHub · parents 6296df9, 589a822 · Browse files · 6 files+16 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+16 added−5 removed

  • other:+16 added−5 removed

6 files+16 added−5 removed

modified:docs/dev/contributing.rst+8 added-1 removed
128 unmodified lines
129 # Aligned with opening delimiter.130 foo = long_function_name(var_one, var_two,131 var_three, var_four)132133No. Just don't. Please.133No. Just don't. Please. This is much better::134135 foo = long_function_name(136 var_one,137 var_two,138 var_three,139 var_four,140 )141142Docstrings are to follow the following syntaxes::143144 def the_earth_is_flat():145 """NASA divided up the seas into thirty-three degrees."""
71 unmodified lines
modified:docs/user/advanced.rst+1 added-1 removed
191 unmodified lines
192When you are using the prepared request flow, keep in mind that it does not take into account the environment.193This can cause problems if you are using environment variables to change the behaviour of requests.194For example: Self-signed SSL certificates specified in ``REQUESTS_CA_BUNDLE`` will not be taken into account.195As a result an ``SSL: CERTIFICATE_VERIFY_FAILED`` is thrown.196You can get around this behaviour by explicity merging the environment settings into your session::196You can get around this behaviour by explicitly merging the environment settings into your session::197198 from requests import Request, Session199200 s = Session()
832 unmodified lines
modified:requests/api.py+4 added-2 removed
14 unmodified lines
1516def request(method, url, **kwargs):17 """Constructs and sends a :class:`Request <Request>`.1819 :param method: method for the new :class:`Request` object.19 :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS`, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.20 :param url: URL for the new :class:`Request` object.21 :param params: (optional) Dictionary, list of tuples or bytes to send22 in the query string for the :class:`Request`.23 :param data: (optional) Dictionary, list of tuples, bytes, or file-like
67 unmodified lines
91def head(url, **kwargs):92 r"""Sends a HEAD request.9394 :param url: URL for the new :class:`Request` object.95 :param \*\*kwargs: Optional arguments that ``request`` takes.95 :param \*\*kwargs: Optional arguments that ``request`` takes. If96 `allow_redirects` is not provided, it will be set to `False` (as97 opposed to the default :meth:`request` behavior).98 :return: :class:`Response <Response>` object99 :rtype: requests.Response100 """101
59 unmodified lines
modified:.gitignore+1 added
12 unmodified lines
13*.pyc14*.swp15*.egg16env/17.eggs/1819.workon2021t.py
5 unmodified lines
modified:AUTHORS.rst+1 added
188 unmodified lines
189- Darren Dormer (`@ddormer <https://github.com/ddormer>`_)190- Rajiv Mayani (`@mayani <https://github.com/mayani>`_)191- Antti Kaihola (`@akaihola <https://github.com/akaihola>`_)192- Belavin Denis (`@luckydenis <https://github.com/luckydenis>`_)193- Dull Bananas <dull.bananas0@gmail.com> (`@dullbananas <https://github.com/dullbananas>`_)
modified:HISTORY.md+1 added-1 removed
547 unmodified lines
548 status code registry.549550**Bugfixes**551552- For file-like objects that are not seeked to the very beginning, we552- For file-like objects that are not sought to the very beginning, we553 now send the content length for the number of bytes we will actually554 read, rather than the total size of the file, allowing partial file555 uploads.556- When uploading file-like objects, if they are empty or have no
1094 unmodified lines