Skip to content

Commit

Permalink
Merge pull request pypa#12518 from sbidoul/upgrade-vendored-deps-sbi
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored Mar 10, 2024
2 parents a33caa2 + 4a4c55f commit fb5f63f
Show file tree
Hide file tree
Showing 92 changed files with 1,944 additions and 1,421 deletions.
1 change: 1 addition & 0 deletions news/certifi.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade certifi to 2024.2.2
1 change: 1 addition & 0 deletions news/chardet.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade chardet to 5.2.0
1 change: 1 addition & 0 deletions news/distro.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade distro to 1.9.0
1 change: 1 addition & 0 deletions news/idna.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade idna to 3.6
1 change: 1 addition & 0 deletions news/msgpack.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade msgpack to 1.0.8
1 change: 1 addition & 0 deletions news/platformdirs.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade platformdirs to 4.2.0
1 change: 1 addition & 0 deletions news/pygments.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade pygments to 2.17.2
1 change: 1 addition & 0 deletions news/rich.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade rich to 13.7.0
1 change: 1 addition & 0 deletions news/setuptools.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade setuptools to 69.1.1
1 change: 1 addition & 0 deletions news/tenacity.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade tenacity to 8.2.3
1 change: 1 addition & 0 deletions news/typing_extensions.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade typing_extensions to 4.9.0
1 change: 1 addition & 0 deletions news/urllib3.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade urllib3 to 1.26.18
1 change: 0 additions & 1 deletion src/pip/_vendor/certifi/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ This package contains a modified version of ca-bundle.crt:

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

Certificate data from Mozilla as of: Thu Nov 3 19:04:19 2011#
This is a bundle of X.509 certificates of public Certificate Authorities
(CA). These were automatically extracted from Mozilla's root certificates
file (certdata.txt). This file can be found in the mozilla source tree:
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/certifi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .core import contents, where

__all__ = ["contents", "where"]
__version__ = "2023.07.22"
__version__ = "2024.02.02"
321 changes: 250 additions & 71 deletions src/pip/_vendor/certifi/cacert.pem

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/pip/_vendor/certifi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
This module returns the installation location of cacert.pem or its contents.
"""
import sys
import atexit

def exit_cacert_ctx() -> None:
_CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr]


if sys.version_info >= (3, 11):
Expand Down Expand Up @@ -35,6 +39,7 @@ def where() -> str:
# we will also store that at the global level as well.
_CACERT_CTX = as_file(files("pip._vendor.certifi").joinpath("cacert.pem"))
_CACERT_PATH = str(_CACERT_CTX.__enter__())
atexit.register(exit_cacert_ctx)

return _CACERT_PATH

Expand Down Expand Up @@ -70,6 +75,7 @@ def where() -> str:
# we will also store that at the global level as well.
_CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem")
_CACERT_PATH = str(_CACERT_CTX.__enter__())
atexit.register(exit_cacert_ctx)

return _CACERT_PATH

Expand Down
6 changes: 6 additions & 0 deletions src/pip/_vendor/chardet/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Wrapper so people can run python -m chardet"""

from .cli.chardetect import main

if __name__ == "__main__":
main()
2 changes: 1 addition & 1 deletion src/pip/_vendor/chardet/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
:author: Dan Blanchard ([email protected])
"""

__version__ = "5.1.0"
__version__ = "5.2.0"
VERSION = __version__.split(".")
12 changes: 8 additions & 4 deletions src/pip/_vendor/distro/distro.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright 2015,2016,2017 Nir Cohen
# Copyright 2015-2021 Nir Cohen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -55,7 +55,7 @@
# Python 3.7
TypedDict = dict

__version__ = "1.8.0"
__version__ = "1.9.0"


class VersionDict(TypedDict):
Expand Down Expand Up @@ -125,6 +125,7 @@ class InfoDict(TypedDict):
# Base file names to be looked up for if _UNIXCONFDIR is not readable.
_DISTRO_RELEASE_BASENAMES = [
"SuSE-release",
"altlinux-release",
"arch-release",
"base-release",
"centos-release",
Expand All @@ -151,6 +152,8 @@ class InfoDict(TypedDict):
"system-release",
"plesk-release",
"iredmail-release",
"board-release",
"ec2_version",
)


Expand Down Expand Up @@ -243,6 +246,7 @@ def id() -> str:
"rocky" Rocky Linux
"aix" AIX
"guix" Guix System
"altlinux" ALT Linux
============== =========================================
If you have a need to get distros for reliable IDs added into this set,
Expand Down Expand Up @@ -991,10 +995,10 @@ def info(self, pretty: bool = False, best: bool = False) -> InfoDict:
For details, see :func:`distro.info`.
"""
return dict(
return InfoDict(
id=self.id(),
version=self.version(pretty, best),
version_parts=dict(
version_parts=VersionDict(
major=self.major_version(best),
minor=self.minor_version(best),
build_number=self.build_number(best),
Expand Down
36 changes: 19 additions & 17 deletions src/pip/_vendor/idna/LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
BSD 3-Clause License

Copyright (c) 2013-2021, Kim Davies
Copyright (c) 2013-2023, Kim Davies and contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 changes: 20 additions & 14 deletions src/pip/_vendor/idna/codec.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .core import encode, decode, alabel, ulabel, IDNAError
import codecs
import re
from typing import Tuple, Optional
from typing import Any, Tuple, Optional

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

Expand All @@ -26,24 +26,24 @@ def decode(self, data: bytes, errors: str = 'strict') -> Tuple[str, int]:
return decode(data), len(data)

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

if not data:
return "", 0
return b'', 0

labels = _unicode_dots_re.split(data)
trailing_dot = ''
trailing_dot = b''
if labels:
if not labels[-1]:
trailing_dot = '.'
trailing_dot = b'.'
del labels[-1]
elif not final:
# Keep potentially unfinished label until the next call
del labels[-1]
if labels:
trailing_dot = '.'
trailing_dot = b'.'

result = []
size = 0
Expand All @@ -54,18 +54,21 @@ def _buffer_encode(self, data: str, errors: str, final: bool) -> Tuple[str, int]
size += len(label)

# Join with U+002E
result_str = '.'.join(result) + trailing_dot # type: ignore
result_bytes = b'.'.join(result) + trailing_dot
size += len(trailing_dot)
return result_str, size
return result_bytes, size

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

if not data:
return ('', 0)

if not isinstance(data, str):
data = str(data, 'ascii')

labels = _unicode_dots_re.split(data)
trailing_dot = ''
if labels:
Expand Down Expand Up @@ -99,14 +102,17 @@ class StreamReader(Codec, codecs.StreamReader):
pass


def getregentry() -> codecs.CodecInfo:
# Compatibility as a search_function for codecs.register()
def search_function(name: str) -> Optional[codecs.CodecInfo]:
if name != 'idna2008':
return None
return codecs.CodecInfo(
name='idna',
encode=Codec().encode, # type: ignore
decode=Codec().decode, # type: ignore
name=name,
encode=Codec().encode,
decode=Codec().decode,
incrementalencoder=IncrementalEncoder,
incrementaldecoder=IncrementalDecoder,
streamwriter=StreamWriter,
streamreader=StreamReader,
)

codecs.register(search_function)
10 changes: 5 additions & 5 deletions src/pip/_vendor/idna/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def uts46_remap(domain: str, std3_rules: bool = True, transitional: bool = False
status = uts46row[1]
replacement = None # type: Optional[str]
if len(uts46row) == 3:
replacement = uts46row[2] # type: ignore
replacement = uts46row[2]
if (status == 'V' or
(status == 'D' and not transitional) or
(status == '3' and not std3_rules and replacement is None)):
Expand All @@ -338,9 +338,9 @@ def uts46_remap(domain: str, std3_rules: bool = True, transitional: bool = False


def encode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool = False, std3_rules: bool = False, transitional: bool = False) -> bytes:
if isinstance(s, (bytes, bytearray)):
if not isinstance(s, str):
try:
s = s.decode('ascii')
s = str(s, 'ascii')
except UnicodeDecodeError:
raise IDNAError('should pass a unicode string to the function rather than a byte string.')
if uts46:
Expand Down Expand Up @@ -372,8 +372,8 @@ def encode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool =

def decode(s: Union[str, bytes, bytearray], strict: bool = False, uts46: bool = False, std3_rules: bool = False) -> str:
try:
if isinstance(s, (bytes, bytearray)):
s = s.decode('ascii')
if not isinstance(s, str):
s = str(s, 'ascii')
except UnicodeDecodeError:
raise IDNAError('Invalid ASCII in A-label')
if uts46:
Expand Down
9 changes: 4 additions & 5 deletions src/pip/_vendor/idna/idnadata.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is automatically generated by tools/idna-data

__version__ = '15.0.0'
__version__ = '15.1.0'
scripts = {
'Greek': (
0x37000000374,
Expand Down Expand Up @@ -59,6 +59,7 @@
0x2b7400002b81e,
0x2b8200002cea2,
0x2ceb00002ebe1,
0x2ebf00002ee5e,
0x2f8000002fa1e,
0x300000003134b,
0x31350000323b0,
Expand Down Expand Up @@ -1834,7 +1835,6 @@
0xa7d50000a7d6,
0xa7d70000a7d8,
0xa7d90000a7da,
0xa7f20000a7f5,
0xa7f60000a7f8,
0xa7fa0000a828,
0xa82c0000a82d,
Expand Down Expand Up @@ -1907,9 +1907,7 @@
0x1060000010737,
0x1074000010756,
0x1076000010768,
0x1078000010786,
0x10787000107b1,
0x107b2000107bb,
0x1078000010781,
0x1080000010806,
0x1080800010809,
0x1080a00010836,
Expand Down Expand Up @@ -2134,6 +2132,7 @@
0x2b7400002b81e,
0x2b8200002cea2,
0x2ceb00002ebe1,
0x2ebf00002ee5e,
0x300000003134b,
0x31350000323b0,
),
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/idna/package_data.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '3.4'
__version__ = '3.6'

Loading

0 comments on commit fb5f63f

Please sign in to comment.