@@ -2,10 +2,10 @@ This patch mainly handles tweaking imports into a form that can be transformed
2
2
to import from the vendored namespace.
3
3
4
4
diff --git a/src/pip/_vendor/pygments/cmdline.py b/src/pip/_vendor/pygments/cmdline.py
5
- index d9a0fdc8b..db6de0cd3 100644
5
+ index 435231e6..b75a9d7f 100644
6
6
--- a/src/pip/_vendor/pygments/cmdline.py
7
7
+++ b/src/pip/_vendor/pygments/cmdline.py
8
- @@ -410 ,11 +410 ,11 @@ def is_only_option(opt ):
8
+ @@ -469 ,11 +469 ,11 @@ def main_inner(parser, argns ):
9
9
outfile = UnclosingTextIOWrapper(outfile, encoding=fmter.encoding)
10
10
fmter.encoding = None
11
11
try:
@@ -17,26 +17,41 @@ index d9a0fdc8b..db6de0cd3 100644
17
17
- outfile = colorama.initialise.wrap_stream(
18
18
+ outfile = colorama_initialise.wrap_stream(
19
19
outfile, convert=None, strip=None, autoreset=False, wrap=True)
20
-
20
+
21
21
# When using the LaTeX formatter and the option `escapeinside` is
22
22
diff --git a/src/pip/_vendor/pygments/__main__.py b/src/pip/_vendor/pygments/__main__.py
23
- index c6e2517df..76255b525 100644
23
+ index 5eb2c747..04997f49 100644
24
24
--- a/src/pip/_vendor/pygments/__main__.py
25
25
+++ b/src/pip/_vendor/pygments/__main__.py
26
26
@@ -9,9 +9,9 @@
27
27
"""
28
-
28
+
29
29
import sys
30
30
- import pygments.cmdline
31
31
+ from pygments.cmdline import main
32
-
32
+
33
33
try:
34
34
- sys.exit(pygments.cmdline.main(sys.argv))
35
35
+ sys.exit(main(sys.argv))
36
36
except KeyboardInterrupt:
37
37
sys.exit(1)
38
+ diff --git a/src/pip/_vendor/pygments/lexer.py b/src/pip/_vendor/pygments/lexer.py
39
+ index eb5403e7..837ada12 100644
40
+ --- a/src/pip/_vendor/pygments/lexer.py
41
+ +++ b/src/pip/_vendor/pygments/lexer.py
42
+ @@ -207,7 +207,9 @@ class Lexer(metaclass=LexerMeta):
43
+ text, _ = guess_decode(text)
44
+ elif self.encoding == 'chardet':
45
+ try:
46
+ - import chardet
47
+ + # pip vendoring note: this code is not reachable by pip,
48
+ + # removed import of chardet to make it clear.
49
+ + raise ImportError('chardet is not vendored by pip')
50
+ except ImportError as e:
51
+ raise ImportError('To enable chardet encoding guessing, '
52
+ 'please install the chardet library '
38
53
diff --git a/src/pip/_vendor/pygments/sphinxext.py b/src/pip/_vendor/pygments/sphinxext.py
39
- index 3ea2e36e1..23c19504c 100644
54
+ index f935688f..e2986361 100644
40
55
--- a/src/pip/_vendor/pygments/sphinxext.py
41
56
+++ b/src/pip/_vendor/pygments/sphinxext.py
42
57
@@ -91,7 +91,7 @@ class PygmentsDoc(Directive):
0 commit comments