Skip to content

Commit 73667eb

Browse files
committed
Upgrade certifi to 2022.6.15
1 parent 6fb4bf2 commit 73667eb

File tree

7 files changed

+604
-272
lines changed

7 files changed

+604
-272
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 2022.6.15

src/pip/_vendor/certifi.pyi

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/pip/_vendor/certifi/__init__.py

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

3-
__version__ = "2021.10.08"
3+
__all__ = ["contents", "where"]
4+
__version__ = "2022.06.15"

src/pip/_vendor/certifi/cacert.pem

Lines changed: 585 additions & 262 deletions
Large diffs are not rendered by default.

src/pip/_vendor/certifi/core.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""
42
certifi.py
53
~~~~~~~~~~
64
75
This module returns the installation location of cacert.pem or its contents.
86
"""
97
import os
8+
import types
9+
from typing import Union
1010

1111

1212
class _PipPatchedCertificate(Exception):
@@ -28,7 +28,7 @@ def where():
2828
_CACERT_CTX = None
2929
_CACERT_PATH = None
3030

31-
def where():
31+
def where() -> str:
3232
# This is slightly terrible, but we want to delay extracting the file
3333
# in cases where we're inside of a zipimport situation until someone
3434
# actually calls where(), but we don't want to re-extract the file
@@ -56,21 +56,29 @@ def where():
5656
pass
5757

5858
except ImportError:
59+
Package = Union[types.ModuleType, str]
60+
Resource = Union[str, "os.PathLike"]
61+
5962
# This fallback will work for Python versions prior to 3.7 that lack the
6063
# importlib.resources module but relies on the existing `where` function
6164
# so won't address issues with environments like PyOxidizer that don't set
6265
# __file__ on modules.
63-
def read_text(_module, _path, encoding="ascii"):
64-
with open(where(), "r", encoding=encoding) as data:
66+
def read_text(
67+
package: Package,
68+
resource: Resource,
69+
encoding: str = 'utf-8',
70+
errors: str = 'strict'
71+
) -> str:
72+
with open(where(), encoding=encoding) as data:
6573
return data.read()
6674

6775
# If we don't have importlib.resources, then we will just do the old logic
6876
# of assuming we're on the filesystem and munge the path directly.
69-
def where():
77+
def where() -> str:
7078
f = os.path.dirname(__file__)
7179

7280
return os.path.join(f, "cacert.pem")
7381

7482

75-
def contents():
83+
def contents() -> str:
7684
return read_text("certifi", "cacert.pem", encoding="ascii")

src/pip/_vendor/certifi/py.typed

Whitespace-only changes.

src/pip/_vendor/vendor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pep517==0.12.0
88
platformdirs==2.5.2
99
pyparsing==3.0.9
1010
requests==2.28.1
11-
certifi==2021.10.08
11+
certifi==2022.6.15
1212
chardet==5.0.0
1313
idna==3.3
1414
urllib3==1.26.10

0 commit comments

Comments
 (0)