diff --git a/docs/conf.py b/docs/conf.py index c952fe79..fb10abdb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -376,4 +376,7 @@ epub_exclude_files = ['search.html'] # If false, no index is generated. #epub_use_index = True -intersphinx_mapping = {'urllib3': ('https://urllib3.readthedocs.io/en/latest', None)} +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'urllib3': ('https://urllib3.readthedocs.io/en/latest', None), +} diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 857c296b..2076fc00 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -351,13 +351,11 @@ file-like object for your body:: with open('massive-body', 'rb') as f: requests.post('http://some.url/streamed', data=f) -.. warning:: It is strongly recommended that you open files in `binary mode`_. - This is because Requests may attempt to provide the - ``Content-Length`` header for you, and if it does this value will - be set to the number of *bytes* in the file. Errors may occur if - you open the file in *text mode*. - -.. _binary mode: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files +.. warning:: It is strongly recommended that you open files in :ref:`binary + mode `. This is because Requests may attempt to provide + the ``Content-Length`` header for you, and if it does this value + will be set to the number of *bytes* in the file. Errors may occur + if you open the file in *text mode*. .. _chunk-encoding: @@ -408,13 +406,11 @@ To do that, just set files to a list of tuples of ``(form_field_name, file_info) ... } -.. warning:: It is strongly recommended that you open files in `binary mode`_. - This is because Requests may attempt to provide the - ``Content-Length`` header for you, and if it does this value will - be set to the number of *bytes* in the file. Errors may occur if - you open the file in *text mode*. - -.. _binary mode: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files +.. warning:: It is strongly recommended that you open files in :ref:`binary + mode `. This is because Requests may attempt to provide + the ``Content-Length`` header for you, and if it does this value + will be set to the number of *bytes* in the file. Errors may occur + if you open the file in *text mode*. .. _event-hooks: diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 035b94d2..699c0ffd 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -348,13 +348,11 @@ support this, but there is a separate package which does - For sending multiple files in one request refer to the :ref:`advanced ` section. -.. warning:: It is strongly recommended that you open files in `binary mode`_. - This is because Requests may attempt to provide the - ``Content-Length`` header for you, and if it does this value will - be set to the number of *bytes* in the file. Errors may occur if - you open the file in *text mode*. - -.. _binary mode: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files +.. warning:: It is strongly recommended that you open files in :ref:`binary + mode `. This is because Requests may attempt to provide + the ``Content-Length`` header for you, and if it does this value + will be set to the number of *bytes* in the file. Errors may occur + if you open the file in *text mode*. Response Status Codes