summaryrefslogtreecommitdiff
path: root/Python/context.c
AgeCommit message (Collapse)AuthorLines
2019-12-08bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)Miss Islington (bot)-3/+4
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None. https://bugs.python.org/issue38979 Automerge-Triggered-By: @asvetlov (cherry picked from commit 28c91631c24e53713ad0e8a2bbae716373f5e53d) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
2019-05-29bpo-36974: implement PEP 590 (GH-13185)Jeroen Demeyer-1/+1
Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be> Co-authored-by: Mark Shannon <mark@hotpy.org>
2019-02-25bpo-36101: remove non-ascii characters in docstring (GH-12018)animalize-2/+2
* remove non-ascii characters in docstring * clinic.py emits a warning when docstring has non-ascii character
2018-11-27bpo-33029: Fix signatures of getter and setter functions. (GH-10746)Serhiy Storchaka-2/+2
Fix also return type for few other functions (clear, releasebuffer).
2018-11-27bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)Serhiy Storchaka-1/+1
Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS excluding Argument Clinic generated code.
2018-11-21bpo-35081: Add Include/internal/pycore_object.h (GH-10640)Victor Stinner-2/+3
Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from Include/objimpl.h to Include/internal/pycore_object.h.
2018-11-12bpo-35081: Rename internal headers (GH-10275)Victor Stinner-1/+1
Rename Include/internal/ headers: * pycore_hash.h -> pycore_pyhash.h * pycore_lifecycle.h -> pycore_pylifecycle.h * pycore_mem.h -> pycore_pymem.h * pycore_state.h -> pycore_pystate.h Add missing headers to Makefile.pre.in and PCbuild: * pycore_condvar.h. * pycore_hamt.h * pycore_pyhash.h
2018-11-01bpo-35081: Add _PyThreadState_GET() internal macro (GH-10266)Victor Stinner-4/+4
If Py_BUILD_CORE is defined, the PyThreadState_GET() macro access _PyRuntime which comes from the internal pycore_state.h header. Public headers must not require internal headers. Move PyThreadState_GET() and _PyInterpreterState_GET_UNSAFE() from Include/pystate.h to Include/internal/pycore_state.h, and rename PyThreadState_GET() to _PyThreadState_GET() there. The PyThreadState_GET() macro of pystate.h is now redefined when pycore_state.h is included, to use the fast _PyThreadState_GET(). Changes: * Add _PyThreadState_GET() macro * Replace "PyThreadState_GET()->interp" with _PyInterpreterState_GET_UNSAFE() * Replace PyThreadState_GET() with _PyThreadState_GET() in internal C files (compiled with Py_BUILD_CORE defined), but keep PyThreadState_GET() in the public header files. * _testcapimodule.c: replace PyThreadState_GET() with PyThreadState_Get(); the module is not compiled with Py_BUILD_CORE defined. * pycore_state.h now requires Py_BUILD_CORE to be defined.
2018-11-01bpo-35081: Add pycore_ prefix to internal header files (GH-10263)Victor Stinner-3/+3
* Rename Include/internal/ header files: * pyatomic.h -> pycore_atomic.h * ceval.h -> pycore_ceval.h * condvar.h -> pycore_condvar.h * context.h -> pycore_context.h * pygetopt.h -> pycore_getopt.h * gil.h -> pycore_gil.h * hamt.h -> pycore_hamt.h * hash.h -> pycore_hash.h * mem.h -> pycore_mem.h * pystate.h -> pycore_state.h * warnings.h -> pycore_warnings.h * PCbuild project, Makefile.pre.in, Modules/Setup: add the Include/internal/ directory to the search paths of header files. * Update includes. For example, replace #include "internal/mem.h" with #include "pycore_mem.h".
2018-09-21bpo-34762: Fix contextvars C API to use PyObject* pointer types. (GH-9473)Yury Selivanov-23/+62
2018-07-30Add docstrings to public methods from context.c (GH-8531)Peter Lamut-8/+43
2018-06-28bpo-33985: Implement ContextVar.name attribute. (GH-7980)Yury Selivanov-0/+5
2018-02-09Fix some warnings produced by different compilers. (#5593)Serhiy Storchaka-2/+2
2018-01-27bpo-32436: Use PyThreadState_GET() in all hot paths (GH-5363)Yury Selivanov-3/+6
2018-01-26bpo-32436: Make PyContextVar_Get a little bit faster (#5350)Yury Selivanov-1/+2
Since context.c is compiled with Py_BUILD_CORE, using a macro will result in a slightly more optimal code.
2018-01-25bpo-32436: Fix a refleak; var GC tracking; a GCC warning (#5326)Yury Selivanov-3/+5
The refleak in question wasn't really important, as context vars are usually created at the toplevel and live as long as the interpreter lives, so the context var name isn't ever GCed anyways.
2018-01-23bpo-32436: Don't use native popcount() (also fixes bpo-32641) (#5292)Yury Selivanov-1/+1
2018-01-22bpo-32436: Implement PEP 567 (#5027)Yury Selivanov-0/+1220