Merge pull request #4678 from jdufresne/intersphinx
Before adoption: this commit came in with the history the project adopted, so no landing records it.
In docs, use intersphinx to link to Python documentation
authored by Nate Prewitt · committed by GitHub · parents 922aa40, 5aa6a9b · Browse files · 3 files·+19 added−22 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+19 added−22 removed
- other:+19 added−22 removed
Provenance
- Commit
dffd5d4- Tree
37704df- Author
Nate Prewitt <nate.prewitt@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
922aa40- Parent 2
5aa6a9b
3 files changed+19 added−22 removed
modified:docs/user/advanced.rst+10 added-14 removed
349 unmodified lines350 351 with open('massive-body', 'rb') as f:352 requests.post('http://some.url/streamed', data=f)353 354-.. warning:: It is strongly recommended that you open files in `binary mode`_.355- This is because Requests may attempt to provide the356- ``Content-Length`` header for you, and if it does this value will357- be set to the number of *bytes* in the file. Errors may occur if358- you open the file in *text mode*.354+.. warning:: It is strongly recommended that you open files in :ref:`binary355+ mode <tut-files>`. This is because Requests may attempt to provide356+ the ``Content-Length`` header for you, and if it does this value357+ will be set to the number of *bytes* in the file. Errors may occur358+ if you open the file in *text mode*.359 360-.. _binary mode: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files360 362-361 .. _chunk-encoding:362 363 Chunk-Encoded Requests364 ----------------------40 unmodified lines405 'Content-Type': 'multipart/form-data; boundary=3131623adb2043caaeb5538cc7aa0b3a',406 ...407 }408 411-.. warning:: It is strongly recommended that you open files in `binary mode`_.412- This is because Requests may attempt to provide the413- ``Content-Length`` header for you, and if it does this value will414- be set to the number of *bytes* in the file. Errors may occur if415- you open the file in *text mode*.409+.. warning:: It is strongly recommended that you open files in :ref:`binary410+ mode <tut-files>`. This is because Requests may attempt to provide411+ the ``Content-Length`` header for you, and if it does this value412+ will be set to the number of *bytes* in the file. Errors may occur413+ if you open the file in *text mode*.414 417-.. _binary mode: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files415 419-416 .. _event-hooks:417 418 Event Hooks419 -----------612 unmodified linesmodified:docs/user/quickstart.rst+5 added-7 removed
346 unmodified lines347 348 For sending multiple files in one request refer to the :ref:`advanced <advanced>`349 section.350 351-.. warning:: It is strongly recommended that you open files in `binary mode`_.352- This is because Requests may attempt to provide the353- ``Content-Length`` header for you, and if it does this value will354- be set to the number of *bytes* in the file. Errors may occur if355- you open the file in *text mode*.351+.. warning:: It is strongly recommended that you open files in :ref:`binary352+ mode <tut-files>`. This is because Requests may attempt to provide353+ the ``Content-Length`` header for you, and if it does this value354+ will be set to the number of *bytes* in the file. Errors may occur355+ if you open the file in *text mode*.356 357-.. _binary mode: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files357 359-358 Response Status Codes359 ---------------------360 361 We can check the response status code::201 unmodified linesmodified:docs/conf.py+4 added-1 removed
374 unmodified lines375 376 # If false, no index is generated.377 #epub_use_index = True378 379-intersphinx_mapping = {'urllib3': ('https://urllib3.readthedocs.io/en/latest', None)}379+intersphinx_mapping = {380+ 'python': ('https://docs.python.org/3/', None),381+ 'urllib3': ('https://urllib3.readthedocs.io/en/latest', None),382+}