Commit Graph

84 Commits

Author SHA1 Message Date
Semyon Moroz 4372b1d733 [ctypes] Soft deprecate ARRAY (#15204) 2026-01-15 11:09:58 +01:00
Guo Ci 67c0ee5193 [ctypes] update ctypes.CField (#15052) 2025-12-20 23:39:57 +01:00
GastonAQS e057b9f97f Add broad definition for c_bool constructor (#14841) 2025-10-07 14:56:11 +02:00
Jelle Zijlstra f32d9f08bd stdlib: add __slots__ (#14611) 2025-08-21 07:24:59 -07:00
Semyon Moroz 5e0d6ee95e [stdlib] Copy-edit deprecation messages (#14614)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-08-21 12:12:00 +01:00
Semyon Moroz 9bb8c4f1f9 [stdlib] Add missing Final (#14613) 2025-08-21 12:18:20 +02:00
Semyon Moroz 85a787bba3 [stdlib] Mark constants as Final (#14577) 2025-08-15 13:19:03 +02:00
Sebastian Rittau 8317409c18 [ctypes] Replace two instances of Any (#14047) 2025-07-26 16:24:04 +02:00
Jun Komoda 1c82fa75cd Add CopyComPointer to stdlib/ctypes/__init__.pyi. (#14294) 2025-07-07 14:45:09 +02:00
Semyon Moroz 4ea1f958ce Bump ctypes to 3.14 (#14137) 2025-05-25 18:13:36 -07:00
Sebastian Rittau 7cc094da50 [ctypes] Fix argument name (#14048) 2025-05-13 15:16:35 +03:00
sobolevn bc244028d7 Update _ctypes to 3.14 (#14043) 2025-05-13 13:29:49 +02:00
Joren Hammudoglu 6b8aebcc9c _type_ class attributes in ctypes, and fix ctypes.wintypes.BYTE (#13777) 2025-04-07 14:16:11 +02:00
Joren Hammudoglu 2ae5ed8b62 Make the type-parameter of ctypes.py_object optional (#13760) 2025-04-07 14:03:17 +02:00
Sebastian Rittau 30b16c168d Drop Python 3.8 branches (#13776) 2025-04-03 10:35:36 +02:00
Avasam 4b253d2932 Enable Ruff flake8-todos (TD) (#13748) 2025-04-03 07:43:54 +02:00
Stephen Morton 2a030be2e9 fix ctypes.GetLastError (#13379) 2025-01-09 19:03:56 -08:00
Refael Ackermann ca6251ad64 stdlib: new signature for CDLL in 3.12 (#13313) 2024-12-29 17:24:12 -08:00
Stephen Morton e5c5318115 rename ctypes._FuncPtr (#13290)
fixes https://github.com/python/typeshed/issues/13289
2024-12-24 10:16:57 -08:00
Stephen Morton d8b7ad6e89 fixing up ctypes.memmove and ctypes.memset (#13252) 2024-12-22 16:53:03 -08:00
Stephen Morton 1bf8d501d1 ctypes.CDLL._func_restype_ is a type, not an instance (#13206) 2024-12-06 11:35:58 +01:00
Stephen Morton 7a0f6837e9 add missing ctypes things (#13147) 2024-11-28 12:09:47 -08:00
Stephen Morton d14133b3a6 add the undocumented ctypes.macholib module (#13086) 2024-11-25 16:59:59 +01:00
Stephen Morton 7ab6620c0f fix argument for ctypes.string_at and ctypes.wstring_at (#13075) 2024-11-23 05:11:17 -08:00
Stephen Morton b2c964fdea Make inheritance and metaclass of ctypes better match reality (#12982) 2024-11-18 12:32:20 +01:00
Peter Bierma 1a59cc28ba Add complex arithmetic types to ctypes (#12480) 2024-08-29 17:27:37 +02:00
Max Muoto 0fd6cd211f Resolve 3.13 issues for ctypes._endian (#12372) 2024-08-03 16:04:54 -07:00
Shantanu d9cf43c4c3 Mark pos-only __class_getitem__ args (#11970) 2024-05-18 23:27:51 +02:00
Stephen Morton 9877ed8092 Various ctypes improvements (#11186)
Mostly more attention paid to which classes are actually the same class
2024-01-30 22:18:00 -08:00
Sebastian Rittau 23604858a6 Remove Python 3.7 branches (#11238) 2024-01-05 11:39:39 +01:00
Stephen Morton 6b9f82d2e1 make pointer types in ctypes.wintypes subclasses instead of aliases (#11126)
related to https://github.com/python/typeshed/issues/3968
2023-12-09 20:34:22 -08:00
Jun Komoda 4009efa349 _CField as a generic descriptor protocol (#10595) 2023-09-01 16:23:33 +02:00
Nikita Sobolev 0aa5dd57e5 Update ctypes stubs for Python 3.12 (#10290)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-09 19:55:03 +01:00
Jun Komoda a6ecf564b5 move and rename from ctypes._FuncPointer to _ctypes.CFuncPtr (#10140)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-06 10:17:34 -07:00
Jun Komoda 05c0a1d8b2 move byref-related definitions from ctypes/__init__.pyi to _ctypes.pyi (#10137) 2023-05-03 16:50:47 +01:00
Jun Komoda 01b09d4371 Move some pointer-related definitions from ctypes/__init__.pyi to _ctypes.pyi (#10133) 2023-05-03 10:04:13 +01:00
Jun Komoda ce531f897f move some non-pointer-related definitions from ctypes/__init__.pyi to _ctypes.pyi (#10130)
- `ArgumentError`
- `addressof`
- `alignment`
- `get_errno`
- `resize`
- `set_errno`
- `sizeof`
2023-05-02 16:54:42 +01:00
Jun Komoda bbeec7cbbf Move some Windows-specific things from ctypes/__init__.pyi to _ctypes.pyi (#10128)
- `FormatError`
- `get_last_error`
- `set_last_error`
2023-05-02 11:21:55 +01:00
Jun Komoda 295a5c3e7a Move Structure and Union from ctypes/__init__.pyi to _ctypes.pyi (#10125) 2023-05-01 13:01:41 +01:00
Jun Komoda ae0c9f9dad Move _SimpleCData and Array from ctypes/__init__.pyi to _ctypes.pyi (#10118) 2023-04-30 21:22:46 +01:00
Alex Waygood 257e287fec Stdlib: correct many parameter names (#9815) 2023-03-04 09:53:12 +00:00
Alex Waygood 9ed39d8796 Use typing_extensions.Self in the stdlib (#9694) 2023-02-09 09:12:13 +00:00
Alex Waygood 0ef9c3f8e8 Enable flake8-pyi's Y037 (#9686) 2023-02-06 19:01:02 -08:00
Eclips4 3b4dbe36d4 ctypes._CData: Fix field name (#9633) 2023-01-31 09:16:39 +01:00
Alex Waygood 33a62ae42d Add more defaults to the stdlib (#9606)
Continuing work towards #8988.

The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:

- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Alex Waygood d98d1674e7 Fix a few issues with parameter defaults (#9572) 2023-01-20 09:47:59 -08:00
Jelle Zijlstra ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Avasam 23ac9bff19 Check for unused pyright: ignore and differentiate from mypy ignores (#9397) 2022-12-28 10:44:29 +00:00
Jelle Zijlstra 3d8d744eb4 ctypes: improve bytes handling (#9029) 2022-10-31 15:26:09 +01:00
Candy a702daa631 Fixed ctypes pointer typing errors (#8880) 2022-10-13 20:18:00 -07:00