Skip to content

Commit 4372b1d

Browse files
authored
[ctypes] Soft deprecate ARRAY (#15204)
1 parent 4c63511 commit 4372b1d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/ctypes/__init__.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,12 @@ def create_unicode_buffer(init: int | str, size: int | None = None) -> Array[c_w
169169
if sys.version_info >= (3, 13):
170170
@deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.")
171171
def SetPointerType(pointer: type[_Pointer[Any]], cls: _CTypeBaseType) -> None: ...
172+
@deprecated("Soft deprecated since Python 3.13. Use multiplication instead.")
173+
def ARRAY(typ: _CT, len: int) -> Array[_CT]: ...
172174

173175
else:
174176
def SetPointerType(pointer: type[_Pointer[Any]], cls: _CTypeBaseType) -> None: ...
175-
176-
def ARRAY(typ: _CT, len: int) -> Array[_CT]: ... # Soft Deprecated, no plans to remove
177+
def ARRAY(typ: _CT, len: int) -> Array[_CT]: ...
177178

178179
if sys.platform == "win32":
179180
def DllCanUnloadNow() -> int: ...

0 commit comments

Comments
 (0)