Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.6.2
1 change: 1 addition & 0 deletions news/packaging.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade packaging to 24.1
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.2
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.18.0
1 change: 1 addition & 0 deletions news/pyproject-hooks.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade pyproject-hooks to 1.1.0
2 changes: 1 addition & 1 deletion news/requests.vendor.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Upgrade Requests to 2.32.0
Upgrade requests to 2.32.3
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 70.0.0
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.3.0
1 change: 1 addition & 0 deletions news/truststore.vendor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade truststore to 0.9.1
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.12.2
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ setuptools = "pkg_resources"

[tool.vendoring.license.fallback-urls]
distlib = "https://bitbucket.org/pypa/distlib/raw/master/LICENSE.txt"
pyproject_hooks = "https://raw.githubusercontent.com/pypa/pyproject-hooks/main/LICENSE"

######################################################################################
# ruff
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__ = "2024.02.02"
__version__ = "2024.06.02"
24 changes: 24 additions & 0 deletions src/pip/_vendor/certifi/cacert.pem
Original file line number Diff line number Diff line change
Expand Up @@ -4812,3 +4812,27 @@ X273CXE2whJdV/LItM3z7gLfEdxquVeEHVlNjM7IDiPCtyaaEBRx/pOyiriA8A4Q
ntOoUAw3gi/q4Iqd4Sw5/7W0cwDk90imc6y/st53BIe0o82bNSQ3+pCTE4FCxpgm
dTdmQRCsu/WU48IxK63nI1bMNSWSs1A=
-----END CERTIFICATE-----

# Issuer: CN=FIRMAPROFESIONAL CA ROOT-A WEB O=Firmaprofesional SA
# Subject: CN=FIRMAPROFESIONAL CA ROOT-A WEB O=Firmaprofesional SA
# Label: "FIRMAPROFESIONAL CA ROOT-A WEB"
# Serial: 65916896770016886708751106294915943533
# MD5 Fingerprint: 82:b2:ad:45:00:82:b0:66:63:f8:5f:c3:67:4e:ce:a3
# SHA1 Fingerprint: a8:31:11:74:a6:14:15:0d:ca:77:dd:0e:e4:0c:5d:58:fc:a0:72:a5
# SHA256 Fingerprint: be:f2:56:da:f2:6e:9c:69:bd:ec:16:02:35:97:98:f3:ca:f7:18:21:a0:3e:01:82:57:c5:3c:65:61:7f:3d:4a
-----BEGIN CERTIFICATE-----
MIICejCCAgCgAwIBAgIQMZch7a+JQn81QYehZ1ZMbTAKBggqhkjOPQQDAzBuMQsw
CQYDVQQGEwJFUzEcMBoGA1UECgwTRmlybWFwcm9mZXNpb25hbCBTQTEYMBYGA1UE
YQwPVkFURVMtQTYyNjM0MDY4MScwJQYDVQQDDB5GSVJNQVBST0ZFU0lPTkFMIENB
IFJPT1QtQSBXRUIwHhcNMjIwNDA2MDkwMTM2WhcNNDcwMzMxMDkwMTM2WjBuMQsw
CQYDVQQGEwJFUzEcMBoGA1UECgwTRmlybWFwcm9mZXNpb25hbCBTQTEYMBYGA1UE
YQwPVkFURVMtQTYyNjM0MDY4MScwJQYDVQQDDB5GSVJNQVBST0ZFU0lPTkFMIENB
IFJPT1QtQSBXRUIwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARHU+osEaR3xyrq89Zf
e9MEkVz6iMYiuYMQYneEMy3pA4jU4DP37XcsSmDq5G+tbbT4TIqk5B/K6k84Si6C
cyvHZpsKjECcfIr28jlgst7L7Ljkb+qbXbdTkBgyVcUgt5SjYzBhMA8GA1UdEwEB
/wQFMAMBAf8wHwYDVR0jBBgwFoAUk+FDY1w8ndYn81LsF7Kpryz3dvgwHQYDVR0O
BBYEFJPhQ2NcPJ3WJ/NS7Beyqa8s93b4MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjO
PQQDAwNoADBlAjAdfKR7w4l1M+E7qUW/Runpod3JIha3RxEL2Jq68cgLcFBTApFw
hVmpHqTm6iMxoAACMQD94vizrxa5HnPEluPBMBnYfubDl94cT7iJLzPrSA8Z94dG
XSaQpYXFuXqUPoeovQA=
-----END CERTIFICATE-----
2 changes: 1 addition & 1 deletion src/pip/_vendor/packaging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__summary__ = "Core utilities for Python packages"
__uri__ = "https://github.com/pypa/packaging"

__version__ = "24.0"
__version__ = "24.1"

__author__ = "Donald Stufft and individual contributors"
__email__ = "[email protected]"
Expand Down
8 changes: 5 additions & 3 deletions src/pip/_vendor/packaging/_elffile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
"""

from __future__ import annotations

import enum
import os
import struct
from typing import IO, Optional, Tuple
from typing import IO


class ELFInvalid(ValueError):
Expand Down Expand Up @@ -87,11 +89,11 @@ def __init__(self, f: IO[bytes]) -> None:
except struct.error as e:
raise ELFInvalid("unable to parse machine and section information") from e

def _read(self, fmt: str) -> Tuple[int, ...]:
def _read(self, fmt: str) -> tuple[int, ...]:
return struct.unpack(fmt, self._f.read(struct.calcsize(fmt)))

@property
def interpreter(self) -> Optional[str]:
def interpreter(self) -> str | None:
"""
The path recorded in the ``PT_INTERP`` section header.
"""
Expand Down
22 changes: 12 additions & 10 deletions src/pip/_vendor/packaging/_manylinux.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from __future__ import annotations

import collections
import contextlib
import functools
import os
import re
import sys
import warnings
from typing import Dict, Generator, Iterator, NamedTuple, Optional, Sequence, Tuple
from typing import Generator, Iterator, NamedTuple, Sequence

from ._elffile import EIClass, EIData, ELFFile, EMachine

Expand All @@ -17,7 +19,7 @@
# `os.PathLike` not a generic type until Python 3.9, so sticking with `str`
# as the type for `path` until then.
@contextlib.contextmanager
def _parse_elf(path: str) -> Generator[Optional[ELFFile], None, None]:
def _parse_elf(path: str) -> Generator[ELFFile | None, None, None]:
try:
with open(path, "rb") as f:
yield ELFFile(f)
Expand Down Expand Up @@ -72,15 +74,15 @@ def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool:
# For now, guess what the highest minor version might be, assume it will
# be 50 for testing. Once this actually happens, update the dictionary
# with the actual value.
_LAST_GLIBC_MINOR: Dict[int, int] = collections.defaultdict(lambda: 50)
_LAST_GLIBC_MINOR: dict[int, int] = collections.defaultdict(lambda: 50)


class _GLibCVersion(NamedTuple):
major: int
minor: int


def _glibc_version_string_confstr() -> Optional[str]:
def _glibc_version_string_confstr() -> str | None:
"""
Primary implementation of glibc_version_string using os.confstr.
"""
Expand All @@ -90,7 +92,7 @@ def _glibc_version_string_confstr() -> Optional[str]:
# https://github.com/python/cpython/blob/fcf1d003bf4f0100c/Lib/platform.py#L175-L183
try:
# Should be a string like "glibc 2.17".
version_string: Optional[str] = os.confstr("CS_GNU_LIBC_VERSION")
version_string: str | None = os.confstr("CS_GNU_LIBC_VERSION")
assert version_string is not None
_, version = version_string.rsplit()
except (AssertionError, AttributeError, OSError, ValueError):
Expand All @@ -99,7 +101,7 @@ def _glibc_version_string_confstr() -> Optional[str]:
return version


def _glibc_version_string_ctypes() -> Optional[str]:
def _glibc_version_string_ctypes() -> str | None:
"""
Fallback implementation of glibc_version_string using ctypes.
"""
Expand Down Expand Up @@ -143,12 +145,12 @@ def _glibc_version_string_ctypes() -> Optional[str]:
return version_str


def _glibc_version_string() -> Optional[str]:
def _glibc_version_string() -> str | None:
"""Returns glibc version string, or None if not using glibc."""
return _glibc_version_string_confstr() or _glibc_version_string_ctypes()


def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
def _parse_glibc_version(version_str: str) -> tuple[int, int]:
"""Parse glibc version.

We use a regexp instead of str.split because we want to discard any
Expand All @@ -167,8 +169,8 @@ def _parse_glibc_version(version_str: str) -> Tuple[int, int]:
return int(m.group("major")), int(m.group("minor"))


@functools.lru_cache()
def _get_glibc_version() -> Tuple[int, int]:
@functools.lru_cache
def _get_glibc_version() -> tuple[int, int]:
version_str = _glibc_version_string()
if version_str is None:
return (-1, -1)
Expand Down
10 changes: 6 additions & 4 deletions src/pip/_vendor/packaging/_musllinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
linked against musl, and what musl version is used.
"""

from __future__ import annotations

import functools
import re
import subprocess
import sys
from typing import Iterator, NamedTuple, Optional, Sequence
from typing import Iterator, NamedTuple, Sequence

from ._elffile import ELFFile

Expand All @@ -18,7 +20,7 @@ class _MuslVersion(NamedTuple):
minor: int


def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
def _parse_musl_version(output: str) -> _MuslVersion | None:
lines = [n for n in (n.strip() for n in output.splitlines()) if n]
if len(lines) < 2 or lines[0][:4] != "musl":
return None
Expand All @@ -28,8 +30,8 @@ def _parse_musl_version(output: str) -> Optional[_MuslVersion]:
return _MuslVersion(major=int(m.group(1)), minor=int(m.group(2)))


@functools.lru_cache()
def _get_musl_version(executable: str) -> Optional[_MuslVersion]:
@functools.lru_cache
def _get_musl_version(executable: str) -> _MuslVersion | None:
"""Detect currently-running musl runtime version.

This is done by checking the specified executable's dynamic linking
Expand Down
26 changes: 12 additions & 14 deletions src/pip/_vendor/packaging/_parser.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"""Handwritten parser of dependency specifiers.

The docstring for each __parse_* function contains ENBF-inspired grammar representing
The docstring for each __parse_* function contains EBNF-inspired grammar representing
the implementation.
"""

from __future__ import annotations

import ast
from typing import Any, List, NamedTuple, Optional, Tuple, Union
from typing import NamedTuple, Sequence, Tuple, Union

from ._tokenizer import DEFAULT_RULES, Tokenizer

Expand Down Expand Up @@ -41,20 +43,16 @@ def serialize(self) -> str:

MarkerVar = Union[Variable, Value]
MarkerItem = Tuple[MarkerVar, Op, MarkerVar]
# MarkerAtom = Union[MarkerItem, List["MarkerAtom"]]
# MarkerList = List[Union["MarkerList", MarkerAtom, str]]
# mypy does not support recursive type definition
# https://github.com/python/mypy/issues/731
MarkerAtom = Any
MarkerList = List[Any]
MarkerAtom = Union[MarkerItem, Sequence["MarkerAtom"]]
MarkerList = Sequence[Union["MarkerList", MarkerAtom, str]]


class ParsedRequirement(NamedTuple):
name: str
url: str
extras: List[str]
extras: list[str]
specifier: str
marker: Optional[MarkerList]
marker: MarkerList | None


# --------------------------------------------------------------------------------------
Expand Down Expand Up @@ -87,7 +85,7 @@ def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement:

def _parse_requirement_details(
tokenizer: Tokenizer,
) -> Tuple[str, str, Optional[MarkerList]]:
) -> tuple[str, str, MarkerList | None]:
"""
requirement_details = AT URL (WS requirement_marker?)?
| specifier WS? (requirement_marker)?
Expand Down Expand Up @@ -156,7 +154,7 @@ def _parse_requirement_marker(
return marker


def _parse_extras(tokenizer: Tokenizer) -> List[str]:
def _parse_extras(tokenizer: Tokenizer) -> list[str]:
"""
extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
"""
Expand All @@ -175,11 +173,11 @@ def _parse_extras(tokenizer: Tokenizer) -> List[str]:
return extras


def _parse_extras_list(tokenizer: Tokenizer) -> List[str]:
def _parse_extras_list(tokenizer: Tokenizer) -> list[str]:
"""
extras_list = identifier (wsp* ',' wsp* identifier)*
"""
extras: List[str] = []
extras: list[str] = []

if not tokenizer.check("IDENTIFIER"):
return extras
Expand Down
18 changes: 10 additions & 8 deletions src/pip/_vendor/packaging/_tokenizer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from __future__ import annotations

import contextlib
import re
from dataclasses import dataclass
from typing import Dict, Iterator, NoReturn, Optional, Tuple, Union
from typing import Iterator, NoReturn

from .specifiers import Specifier

Expand All @@ -21,7 +23,7 @@ def __init__(
message: str,
*,
source: str,
span: Tuple[int, int],
span: tuple[int, int],
) -> None:
self.span = span
self.message = message
Expand All @@ -34,7 +36,7 @@ def __str__(self) -> str:
return "\n ".join([self.message, self.source, marker])


DEFAULT_RULES: "Dict[str, Union[str, re.Pattern[str]]]" = {
DEFAULT_RULES: dict[str, str | re.Pattern[str]] = {
"LEFT_PARENTHESIS": r"\(",
"RIGHT_PARENTHESIS": r"\)",
"LEFT_BRACKET": r"\[",
Expand Down Expand Up @@ -96,13 +98,13 @@ def __init__(
self,
source: str,
*,
rules: "Dict[str, Union[str, re.Pattern[str]]]",
rules: dict[str, str | re.Pattern[str]],
) -> None:
self.source = source
self.rules: Dict[str, re.Pattern[str]] = {
self.rules: dict[str, re.Pattern[str]] = {
name: re.compile(pattern) for name, pattern in rules.items()
}
self.next_token: Optional[Token] = None
self.next_token: Token | None = None
self.position = 0

def consume(self, name: str) -> None:
Expand Down Expand Up @@ -154,8 +156,8 @@ def raise_syntax_error(
self,
message: str,
*,
span_start: Optional[int] = None,
span_end: Optional[int] = None,
span_start: int | None = None,
span_end: int | None = None,
) -> NoReturn:
"""Raise ParserSyntaxError at the given position."""
span = (
Expand Down
Loading