Document that "coding: utf-8" is supported in requirements.txt

Fixes #7182
This commit is contained in:
Ananya Maiti 2019-10-14 13:54:55 +05:30
parent cbc03f3326
commit bb047aa263
3 changed files with 5 additions and 0 deletions

View File

@ -148,6 +148,9 @@ and the newline following it is effectively ignored.
Comments are stripped *before* line continuations are processed.
To interpret the requirements file in UTF-8 format add a comment
``# -*- coding: utf-8 -*-`` to the first or second line of the file.
The following options are supported:
* :ref:`-i, --index-url <--index-url>`

1
news/7182.doc Normal file
View File

@ -0,0 +1 @@
Document that "coding: utf-8" is supported in requirements.txt

View File

@ -509,6 +509,7 @@ def get_file_content(url, comes_from=None, session=None):
# type: (str, Optional[str], Optional[PipSession]) -> Tuple[str, Text]
"""Gets the content of a file; it may be a filename, file: URL, or
http: URL. Returns (location, content). Content is unicode.
Respects # -*- coding: declarations on the retrieved files.
:param url: File path or url.
:param comes_from: Origin description of requirements.