summaryrefslogtreecommitdiffstats
path: root/Modules/_typingmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-123448: Move `_PyNoDefault_Type` to the static types array (#123449)Peter Bierma2024-08-291-3/+0
|
* gh-118895: Call PyType_Ready() on typing.NoDefault (#118897)Jelle Zijlstra2024-05-101-0/+3
|
* gh-116322: Add Py_mod_gil module slot (#116882)Brett Simmers2024-05-031-0/+1
| | | | | | | | | | | | | | This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
* gh-116126: Implement PEP 696 (#116129)Jelle Zijlstra2024-05-031-0/+3
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* Improve `_typing.__doc__` (#107908)Nikita Sobolev2023-08-131-1/+1
|
* gh-106320: Use _PyInterpreterState_GET() (#106336)Victor Stinner2023-07-021-3/+4
| | | | Replace PyInterpreterState_Get() with inlined _PyInterpreterState_GET().
* gh-104549: Set __module__ on TypeAliasType (#104550)Jelle Zijlstra2023-05-181-1/+4
|
* gh-103763: Implement PEP 695 (#103764)Jelle Zijlstra2023-05-161-0/+28
| | | | | | | | | | | | | | This implements PEP 695, Type Parameter Syntax. It adds support for: - Generic functions (def func[T](): ...) - Generic classes (class X[T](): ...) - Type aliases (type X = ...) - New scoping when the new syntax is used within a class body - Compiler and interpreter changes to support the new syntax and scoping rules Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Eric Traut <eric@traut.com> Co-authored-by: Larry Hastings <larry@hastings.org> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-051-0/+1
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
* gh-99300: Use Py_NewRef() in Modules/ directory (#99468)Victor Stinner2022-11-141-2/+1
| | | | Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in test C files of the Modules/ directory.
* bpo-44353: Implement typing.NewType __call__ method in C (#27262)Yurii Karabas2021-07-221-0/+59
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Denis Laxalde <denis@laxalde.org>