Skip to content

Commit 4a4c55f

Browse files
committed
Upgrade certifi to 2024.2.2
1 parent b968548 commit 4a4c55f

File tree

7 files changed

+265
-78
lines changed

7 files changed

+265
-78
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 2024.2.2

src/pip/_vendor/certifi/LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ This package contains a modified version of ca-bundle.crt:
22

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

5-
Certificate data from Mozilla as of: Thu Nov 3 19:04:19 2011#
65
This is a bundle of X.509 certificates of public Certificate Authorities
76
(CA). These were automatically extracted from Mozilla's root certificates
87
file (certdata.txt). This file can be found in the mozilla source tree:

src/pip/_vendor/certifi/__init__.py

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

33
__all__ = ["contents", "where"]
4-
__version__ = "2023.07.22"
4+
__version__ = "2024.02.02"

src/pip/_vendor/certifi/cacert.pem

Lines changed: 250 additions & 71 deletions
Large diffs are not rendered by default.

src/pip/_vendor/certifi/core.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
This module returns the installation location of cacert.pem or its contents.
66
"""
77
import sys
8+
import atexit
9+
10+
def exit_cacert_ctx() -> None:
11+
_CACERT_CTX.__exit__(None, None, None) # type: ignore[union-attr]
812

913

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

3944
return _CACERT_PATH
4045

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

7480
return _CACERT_PATH
7581

src/pip/_vendor/vendor.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ platformdirs==4.2.0
88
pyparsing==3.1.0
99
pyproject-hooks==1.0.0
1010
requests==2.31.0
11-
certifi==2023.7.22
11+
certifi==2024.2.2
1212
chardet==5.2.0
1313
idna==3.6
1414
urllib3==1.26.18

tools/vendoring/patches/certifi.patch

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
diff --git a/src/pip/_vendor/certifi/core.py b/src/pip/_vendor/certifi/core.py
2-
index de028981b..c3e546604 100644
2+
index 91f538bb1..70e0c3bdb 100644
33
--- a/src/pip/_vendor/certifi/core.py
44
+++ b/src/pip/_vendor/certifi/core.py
5-
@@ -33,13 +33,13 @@ def where() -> str:
5+
@@ -37,14 +37,14 @@ if sys.version_info >= (3, 11):
66
# We also have to hold onto the actual context manager, because
77
# it will do the cleanup whenever it gets garbage collected, so
88
# we will also store that at the global level as well.
99
- _CACERT_CTX = as_file(files("certifi").joinpath("cacert.pem"))
1010
+ _CACERT_CTX = as_file(files("pip._vendor.certifi").joinpath("cacert.pem"))
1111
_CACERT_PATH = str(_CACERT_CTX.__enter__())
12+
atexit.register(exit_cacert_ctx)
1213

1314
return _CACERT_PATH
1415

@@ -18,13 +19,14 @@ index de028981b..c3e546604 100644
1819

1920
elif sys.version_info >= (3, 7):
2021

21-
@@ -68,13 +68,13 @@ def where() -> str:
22+
@@ -73,14 +73,14 @@ elif sys.version_info >= (3, 7):
2223
# We also have to hold onto the actual context manager, because
2324
# it will do the cleanup whenever it gets garbage collected, so
2425
# we will also store that at the global level as well.
2526
- _CACERT_CTX = get_path("certifi", "cacert.pem")
2627
+ _CACERT_CTX = get_path("pip._vendor.certifi", "cacert.pem")
2728
_CACERT_PATH = str(_CACERT_CTX.__enter__())
29+
atexit.register(exit_cacert_ctx)
2830

2931
return _CACERT_PATH
3032

@@ -34,7 +36,7 @@ index de028981b..c3e546604 100644
3436

3537
else:
3638
import os
37-
@@ -105,4 +105,4 @@ def where() -> str:
39+
@@ -111,4 +111,4 @@ else:
3840
return os.path.join(f, "cacert.pem")
3941

4042
def contents() -> str:

0 commit comments

Comments
 (0)