stdlib: new signature for CDLL in 3.12 (#13313)

This commit is contained in:
Refael Ackermann
2024-12-29 20:24:12 -05:00
committed by GitHub
parent ebc9ff8718
commit ca6251ad64
2 changed files with 18 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
import ctypes
import sys
from pathlib import Path
from typing_extensions import assert_type
assert_type(ctypes.CDLL(None), ctypes.CDLL)
assert_type(ctypes.CDLL("."), ctypes.CDLL)
# https://github.com/python/cpython/pull/7032
if sys.version_info >= (3, 12):
assert_type(ctypes.CDLL(Path(".")), ctypes.CDLL)