Skip to content

Commit

Permalink
Use cacert.pem from certifi 2024.7.4. (#14)
Browse files Browse the repository at this point in the history
Add `nox -e update-certifi-cacert-pem` and run it to refresh Pip's
vendored certifi with the latest CA certs that should be trusted.

CF #12 by @gs-kamnas that prompted this.
  • Loading branch information
jsirois authored Jul 25, 2024
1 parent 00827ec commit 4850833
Show file tree
Hide file tree
Showing 2 changed files with 1,459 additions and 1,245 deletions.
19 changes: 19 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,22 @@ def upload_release(session):

session.log("# Upload distributions")
session.run("twine", "upload", *distribution_files)


@nox.session(name="update-certifi-cacert-pem")
def update_certifi_cacert_pem(session):
session.install("certifi")
with open("src/pip/_vendor/certifi/cacert.pem", "w") as fp:
fp.write(
"# Updated via `nox -e update-certifi-cacert-pem` using certifi "
)
fp.flush()
session.run(
"python",
"-c",
'from importlib.metadata import version; print(version("certifi"))',
stdout=fp
)
print(file=fp)
fp.flush()
session.run("python", "-m", "certifi", "--contents", stdout=fp)
Loading

0 comments on commit 4850833

Please sign in to comment.