Skip to content

Commit

Permalink
Merge pull request #7195 from ananyo2012/utf8-doc
Browse files Browse the repository at this point in the history
Document that "coding: utf-8" is supported in requirements.txt
  • Loading branch information
chrahunt authored Nov 1, 2019
2 parents 01c953b + bb047aa commit 5538244
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/html/reference/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>`
Expand Down
1 change: 1 addition & 0 deletions news/7182.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document that "coding: utf-8" is supported in requirements.txt
1 change: 1 addition & 0 deletions src/pip/_internal/req/req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5538244

Please sign in to comment.