Skip to content

Commit 629273b

Browse files
blink1073NoahStapp
andauthored
PYTHON-4541 [v4.8] Add attestations for Python Releases (#1747)
Co-authored-by: Noah Stapp <[email protected]>
1 parent 3000d8f commit 629273b

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/workflows/release-python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
permissions:
7373
id-token: write
7474
contents: write
75+
attestations: write
7576
security-events: write
7677
steps:
7778
- uses: mongodb-labs/drivers-github-tools/secure-checkout@v2

.pre-commit-config.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,11 @@ repos:
6464
stages: [manual]
6565

6666
- repo: https://github.com/sirosen/check-jsonschema
67-
rev: 0.27.0
67+
rev: 0.29.0
6868
hooks:
69-
- id: check-jsonschema
70-
name: "Check GitHub Workflows"
71-
files: ^\.github/workflows/
72-
types: [yaml]
73-
args: ["--schemafile", "https://json.schemastore.org/github-workflow"]
74-
stages: [manual]
69+
- id: check-github-workflows
70+
- id: check-github-actions
71+
- id: check-dependabot
7572

7673
- repo: https://github.com/ariebovenberg/slotscheck
7774
rev: v0.17.0

pymongo/pyopenssl_context.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def load_cert_chain(
291291
# Password callback MUST be set first or it will be ignored.
292292
if password:
293293

294-
def _pwcb(_max_length: int, _prompt_twice: bool, _user_data: bytes) -> bytes:
294+
def _pwcb(_max_length: int, _prompt_twice: bool, _user_data: Optional[bytes]) -> bytes:
295295
# XXX:We could check the password length against what OpenSSL
296296
# tells us is the max, but we can't raise an exception, so...
297297
# warn?
@@ -331,6 +331,7 @@ def _load_certifi(self) -> None:
331331
def _load_wincerts(self, store: str) -> None:
332332
"""Attempt to load CA certs from Windows trust store."""
333333
cert_store = self._ctx.get_cert_store()
334+
assert cert_store is not None
334335
oid = _stdlibssl.Purpose.SERVER_AUTH.oid
335336

336337
for cert, encoding, trust in _stdlibssl.enum_certificates(store): # type: ignore

0 commit comments

Comments
 (0)