Skip to content

Commit 282005a

Browse files
illia-vuranusjr
andauthored
Upgrade requests dependencies (#10180)
Co-authored-by: Tzu-ping Chung <[email protected]>
1 parent 1c4753f commit 282005a

24 files changed

+466
-369
lines changed

news/certifi.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade certifi to 2021.05.30.

news/idna.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade idna to 3.2.

news/urllib3.vendor.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade urllib3 to 1.26.6.

src/pip/_vendor/certifi/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This packge contains a modified version of ca-bundle.crt:
1+
This package contains a modified version of ca-bundle.crt:
22

33
ca-bundle.crt -- Bundle of CA Root Certificates
44

src/pip/_vendor/certifi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .core import contents, where
22

3-
__version__ = "2020.12.05"
3+
__version__ = "2021.05.30"

src/pip/_vendor/certifi/cacert.pem

Lines changed: 230 additions & 298 deletions
Large diffs are not rendered by default.

src/pip/_vendor/idna/__init__.py

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
11
from .package_data import __version__
2-
from .core import *
2+
from .core import (
3+
IDNABidiError,
4+
IDNAError,
5+
InvalidCodepoint,
6+
InvalidCodepointContext,
7+
alabel,
8+
check_bidi,
9+
check_hyphen_ok,
10+
check_initial_combiner,
11+
check_label,
12+
check_nfc,
13+
decode,
14+
encode,
15+
ulabel,
16+
uts46_remap,
17+
valid_contextj,
18+
valid_contexto,
19+
valid_label_length,
20+
valid_string_length,
21+
)
22+
from .intranges import intranges_contain
23+
24+
__all__ = [
25+
"IDNABidiError",
26+
"IDNAError",
27+
"InvalidCodepoint",
28+
"InvalidCodepointContext",
29+
"alabel",
30+
"check_bidi",
31+
"check_hyphen_ok",
32+
"check_initial_combiner",
33+
"check_label",
34+
"check_nfc",
35+
"decode",
36+
"encode",
37+
"intranges_contain",
38+
"ulabel",
39+
"uts46_remap",
40+
"valid_contextj",
41+
"valid_contexto",
42+
"valid_label_length",
43+
"valid_string_length",
44+
]

src/pip/_vendor/idna/codec.py

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
from .core import encode, decode, alabel, ulabel, IDNAError
22
import codecs
33
import re
4+
from typing import Tuple, Optional
45

56
_unicode_dots_re = re.compile('[\u002e\u3002\uff0e\uff61]')
67

78
class Codec(codecs.Codec):
89

910
def encode(self, data, errors='strict'):
10-
11+
# type: (str, str) -> Tuple[bytes, int]
1112
if errors != 'strict':
1213
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
1314

1415
if not data:
15-
return "", 0
16+
return b"", 0
1617

1718
return encode(data), len(data)
1819

1920
def decode(self, data, errors='strict'):
20-
21+
# type: (bytes, str) -> Tuple[str, int]
2122
if errors != 'strict':
2223
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
2324

@@ -27,12 +28,13 @@ def decode(self, data, errors='strict'):
2728
return decode(data), len(data)
2829

2930
class IncrementalEncoder(codecs.BufferedIncrementalEncoder):
30-
def _buffer_encode(self, data, errors, final):
31+
def _buffer_encode(self, data, errors, final): # type: ignore
32+
# type: (str, str, bool) -> Tuple[str, int]
3133
if errors != 'strict':
3234
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
3335

3436
if not data:
35-
return ('', 0)
37+
return "", 0
3638

3739
labels = _unicode_dots_re.split(data)
3840
trailing_dot = ''
@@ -55,12 +57,13 @@ def _buffer_encode(self, data, errors, final):
5557
size += len(label)
5658

5759
# Join with U+002E
58-
result = '.'.join(result) + trailing_dot
60+
result_str = '.'.join(result) + trailing_dot # type: ignore
5961
size += len(trailing_dot)
60-
return (result, size)
62+
return result_str, size
6163

6264
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
63-
def _buffer_decode(self, data, errors, final):
65+
def _buffer_decode(self, data, errors, final): # type: ignore
66+
# type: (str, str, bool) -> Tuple[str, int]
6467
if errors != 'strict':
6568
raise IDNAError('Unsupported error handling \"{}\"'.format(errors))
6669

@@ -87,22 +90,26 @@ def _buffer_decode(self, data, errors, final):
8790
size += 1
8891
size += len(label)
8992

90-
result = '.'.join(result) + trailing_dot
93+
result_str = '.'.join(result) + trailing_dot
9194
size += len(trailing_dot)
92-
return (result, size)
95+
return (result_str, size)
9396

9497

9598
class StreamWriter(Codec, codecs.StreamWriter):
9699
pass
97100

101+
98102
class StreamReader(Codec, codecs.StreamReader):
99103
pass
100104

105+
101106
def getregentry():
107+
# type: () -> codecs.CodecInfo
108+
# Compatibility as a search_function for codecs.register()
102109
return codecs.CodecInfo(
103110
name='idna',
104-
encode=Codec().encode,
105-
decode=Codec().decode,
111+
encode=Codec().encode, # type: ignore
112+
decode=Codec().decode, # type: ignore
106113
incrementalencoder=IncrementalEncoder,
107114
incrementaldecoder=IncrementalDecoder,
108115
streamwriter=StreamWriter,

src/pip/_vendor/idna/compat.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
from .core import *
22
from .codec import *
3+
from typing import Any, Union
34

45
def ToASCII(label):
6+
# type: (str) -> bytes
57
return encode(label)
68

79
def ToUnicode(label):
10+
# type: (Union[bytes, bytearray]) -> str
811
return decode(label)
912

1013
def nameprep(s):
14+
# type: (Any) -> None
1115
raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol')
1216

0 commit comments

Comments
 (0)