summaryrefslogtreecommitdiffstats
path: root/Include/cpython/funcobject.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-139924: Add PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME event for function ↵Dino Viehland2025-10-101-1/+2
| | | | | watchers (#139925) Add PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME event for function watchers
* gh-135755: Move `PyFunction_GET_BUILTINS` to the private API (GH-135938)Peter Bierma2025-06-261-5/+0
|
* gh-132775: Unrevert "Add _PyCode_GetVarCounts()" (gh-133265)Eric Snow2025-05-051-0/+5
| | | | | | This reverts commit 811edcf (gh-133232), which itself reverted the original commit 811edcf (gh-133128). We reverted the original change due to failing s390 builds (a big-endian architecture). It ended up that I had not accommodated op caches.
* Revert "gh-132775: Add _PyCode_GetVarCounts() (gh-133128)" (gh-133232)Eric Snow2025-05-011-5/+0
| | | | | The change broke the s390 builds, so I'm reverting it while I investigate. This reverts commit 94b4fcd806e7b692955173d309ea3b70a193ad96.
* gh-132775: Add _PyCode_GetVarCounts() (gh-133128)Eric Snow2025-04-301-0/+5
| | | | | | | This helper is useful in a variety of ways, including in demonstrating how the different counts relate to one another. It will be used in a later change to help identify if a function is "stateless", meaning it doesn't have any free vars or globals. Note that a majority of this change is tests.
* gh-119180: PEP 649: Add __annotate__ attributes (#119209)Jelle Zijlstra2024-05-221-0/+1
|
* gh-118207: Rename the COMMON_FIELDS macro in funcobject.h and undef it after ↵Itamar Oren2024-04-251-3/+5
| | | | use (GH-118208)
* gh-106320: Remove _PyFunction_Vectorcall() API (#107071)Victor Stinner2023-07-221-6/+0
| | | | Move _PyFunction_Vectorcall() API to the internal C API. No longer export the function.
* gh-103763: Implement PEP 695 (#103764)Jelle Zijlstra2023-05-161-0/+1
| | | | | | | | | | | | | | 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-102381: don't call watcher callback with dead object (#102382)Carl Meyer2023-03-081-8/+8
| | | Co-authored-by: T. Wouters <thomas@python.org>
* gh-91053: Add an optional callback that is invoked whenever a function is ↵mpage2022-11-221-0/+49
| | | | modified (#98175)
* GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)adphrost2022-09-151-1/+3
| | | | Co-authored-by: Andrew Frost <adfrost@fb.com> Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
* gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815)Victor Stinner2022-06-161-1/+1
|
* gh-89653: PEP 670: Convert PyFunction macros (#93765)Victor Stinner2022-06-131-16/+39
| | | Convert PyFunction macros to static inline functions.
* bpo-45316: Move private functions to internal C API (GH-31579)Victor Stinner2022-02-251-2/+0
| | | | | | | | | Move the unexported private functions to the internal C API: * pycore_frame.h: _PyFrame_New_NoTrack() * pycore_function.h: _PyFunction_GetVersionForCurrentState() * pycore_genobject.h: _PyAsyncGenValueWrapperNew() * pycore_genobject.h: _PyCoro_GetAwaitableIter() * pycore_genobject.h: _PyGen_yf()
* bpo-44525: Copy free variables in bytecode to allow calls to inner functions ↵Mark Shannon2021-11-231-3/+0
| | | | | | | | | | | to be specialized (GH-29595) * Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead. * Add reference to function to frame, borrow references to builtins and globals. * Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
* po-35134: Move Include/funcobject.h to Include/cpython/ (GH-28958)Victor Stinner2021-10-141-0/+118
Remove redundant "#ifndef Py_LIMITED_API" in funcobject.h.