summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tse <adam.tse@me.com>2018-10-28 16:27:55 +0000
committerAdam Tse <adam.tse@me.com>2018-10-28 16:27:55 +0000
commit9c7bff3b1248be7b3f392c963fcb97f253c22445 (patch)
tree3da6bd6764d337a96bac494cdf97c288a3ffc509
parent2d6756722dd91fb716bbe82df8df32de10fe2f8f (diff)
downloadpip-9c7bff3b1248be7b3f392c963fcb97f253c22445.tar.gz
A working Jython-compatible regex this time.
Co-Authored-By: Benoit Pierre <benoit.pierre@gmail.com>
-rw-r--r--src/pip/_internal/req/req_file.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pip/_internal/req/req_file.py b/src/pip/_internal/req/req_file.py
index 4f61f3cfd..d7e40729d 100644
--- a/src/pip/_internal/req/req_file.py
+++ b/src/pip/_internal/req/req_file.py
@@ -23,7 +23,7 @@ from pip._internal.req.constructors import (
__all__ = ['parse_requirements']
SCHEME_RE = re.compile(r'^(http|https|file):', re.I)
-COMMENT_RE = re.compile(r'\s*#.*$')
+COMMENT_RE = re.compile(r'(^|\s+)#.*$')
# Matches environment variable-style values in '${MY_VARIABLE_1}' with the
# variable name consisting of only uppercase letters, digits or the '_'