Doctest fails (7 out of 11)

Hi,
while I was working on doctests, I noticed some doctests were failing. 

## Expected Result

````
$ pytest --doctest-module .
============================= test session starts ===============================
platform darwin -- Python 3.7.0, pytest-4.0.2, py-1.7.0, pluggy-0.8.1
rootdir: requests/requests, inifile: pytest.ini
plugins: xdist-1.26.1, mock-1.10.1, httpbin-1.0.0, forked-1.0.2, cov-2.6.1
collected 11 items                                                                                                                                        

__init__.py .                [  9%]
adapters.py .             [ 18%]
api.py .                       [ 27%]
models.py ..               [ 45%]
sessions.py .              [ 54%]
status_codes.py .      [ 63%]
utils.py ....                  [100%]

==========================11 passed in 2.92 seconds=============================
````

## Actual Result

````
============================= test session starts ==============================
platform darwin -- Python 3.7.0, pytest-4.0.2, py-1.7.0, pluggy-0.8.1
rootdir: requests/requests, inifile: pytest.ini
plugins: xdist-1.26.1, mock-1.10.1, httpbin-1.0.0, forked-1.0.2, cov-2.6.1
collected 11 items

__init__.py F                                                            [  9%]
adapters.py .                                                            [ 18%]
api.py F                                                                 [ 27%]
models.py F.                                                             [ 45%]
sessions.py F                                                            [ 54%]
status_codes.py F                                                        [ 63%]
utils.py F..F                                                            [100%]

=============================== FAILURES ===================================
______________________________ [doctest] requests ______________________________
010 ~~~~~~~~~~~~~~~~~~~~~
011 
012 Requests is an HTTP library, written in Python, for human beings. Basic GET
013 usage:
014 
015    >>> import requests
016    >>> r = requests.get('https://www.python.org')
017    >>> r.status_code
018    200
019    >>> 'Python is a programming language' in r.content
UNEXPECTED EXCEPTION: TypeError("a bytes-like object is required, not 'str'")
Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
    compileflags, 1), test.globs)

  File "<doctest requests[3]>", line 1, in <module>

TypeError: a bytes-like object is required, not 'str'

requests/requests/__init__.py:19: UnexpectedException
________________________ [doctest] requests.api.request ________________________
043             to a CA bundle to use. Defaults to ``True``.
044     :param stream: (optional) if ``False``, the response content will be immediately downloaded.
045     :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
046     :return: :class:`Response <Response>` object
047     :rtype: requests.Response
048 
049     Usage::
050 
051       >>> import requests
052       >>> req = requests.request('GET', 'https://httpbin.org/get')
Expected:
    <Response [200]>
Got nothing

requests/requests/api.py:52: DocTestFailure
__________________ [doctest] requests.models.PreparedRequest ___________________
273 The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
274     containing the exact bytes that will be sent to the server.
275 
276     Generated from either a :class:`Request <Request>` object or manually.
277 
278     Usage::
279 
280       >>> import requests
281       >>> req = requests.Request('GET', 'https://httpbin.org/get')
282       >>> r = req.prepare()
Expected:
    <PreparedRequest [GET]>
Got nothing

requests/requests/models.py:282: DocTestFailure
_____________________ [doctest] requests.sessions.Session ______________________
345     Basic Usage::
346 
347       >>> import requests
348       >>> s = requests.Session()
349       >>> s.get('https://httpbin.org/get')
350       <Response [200]>
351 
352     Or as a context manager::
353 
354       >>> with requests.Session() as s:
UNEXPECTED EXCEPTION: SyntaxError('unexpected EOF while parsing', ('<doctest requests.sessions.Session[3]>', 1, 30, 'with requests.Session() as s:\n'))
Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
    compileflags, 1), test.globs)

  File "<doctest requests.sessions.Session[3]>", line 1

    with requests.Session() as s:

                                ^

SyntaxError: unexpected EOF while parsing

requests/requests/sessions.py:354: UnexpectedException
_______________________ [doctest] requests.status_codes ________________________
003 
004 The ``codes`` object defines a mapping from common names for HTTP statuses
005 to their numerical codes, accessible either as attributes or as dictionary
006 items.
007 
008 >>> requests.codes['temporary_redirect']
UNEXPECTED EXCEPTION: NameError("name 'requests' is not defined")
Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
    compileflags, 1), test.globs)

  File "<doctest requests.status_codes[0]>", line 1, in <module>

NameError: name 'requests' is not defined

requests/requests/status_codes.py:8: UnexpectedException
__________________ [doctest] requests.utils.from_key_val_list __________________
260 Take an object and test to see if it can be represented as a
261     dictionary. Unless it can not be represented as such, return an
262     OrderedDict, e.g.,
263 
264     ::
265 
266         >>> from_key_val_list([('key', 'val')])
267         OrderedDict([('key', 'val')])
268         >>> from_key_val_list('string')
UNEXPECTED EXCEPTION: ValueError('cannot encode objects that are not 2-tuples')
Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
    compileflags, 1), test.globs)

  File "<doctest requests.utils.from_key_val_list[1]>", line 1, in <module>

  File "/Users/Ale/PycharmProjects/requests/requests/requests/utils.py", line 279, in from_key_val_list
    raise ValueError('cannot encode objects that are not 2-tuples')

ValueError: cannot encode objects that are not 2-tuples

requests/requests/utils.py:268: UnexpectedException
___________________ [doctest] requests.utils.to_key_val_list ___________________
285 Take an object and test to see if it can be represented as a
286     dictionary. If it can be, return a list of tuples, e.g.,
287 
288     ::
289 
290         >>> to_key_val_list([('key', 'val')])
291         [('key', 'val')]
292         >>> to_key_val_list({'key': 'val'})
293         [('key', 'val')]
294         >>> to_key_val_list('string')
UNEXPECTED EXCEPTION: ValueError('cannot encode objects that are not 2-tuples')
Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/doctest.py", line 1329, in __run
    compileflags, 1), test.globs)

  File "<doctest requests.utils.to_key_val_list[2]>", line 1, in <module>

  File "/Users/Ale/PycharmProjects/requests/requests/requests/utils.py", line 303, in to_key_val_list
    raise ValueError('cannot encode objects that are not 2-tuples')

ValueError: cannot encode objects that are not 2-tuples

requests/requests/utils.py:294: UnexpectedException
====================== 7 failed, 4 passed in 3.76 seconds ======================

````

## Reproduction Steps

```bash
 $ py.test --doctest-module requests

```

## System Information

    $ python -m requests.help

```
{
  "chardet": {
    "version": "3.0.4"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "2.8"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.7.0"
  },
  "platform": {
    "release": "18.0.0",
    "system": "Darwin"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.21.0"
  },
  "system_ssl": {
    "version": "1010008f"
  },
  "urllib3": {
    "version": "1.24.1"
  },
  "using_pyopenssl": false
}
```

The PR looks good. Let's wait for the ci to go through.

Hi! I noticed that the related PR was merged (https://github.com/psf/requests/pull/4987) but this issue is still open. 
Should we close it?