| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-16607) (GH-19728)
Adds a short description of `PyDoc_STRVAR` and `PyDoc_STR` to "Useful macros" section of C-API docs.
Currently, there is [one lone mention](https://docs.python.org/3/c-api/module.html?highlight=pydoc_strvarGH-c.PyModuleDef) in the C-API reference, despite the fact that `PyDoc_STRVAR` is ubiquitous to `Modules/`.
Additionally, this properly uses `c:macro` within `Doc/c-api/module.rst` to link..
(cherry picked from commit b54e46cb57ebac5c525a9a6be241412cd57bc935)
Co-authored-by: Brad Solomon <brad.solomon.1124@gmail.com>
|
| |
|
|
|
|
| |
PyObject_GenericSetDict() takes three arguments, not two.
(cherry picked from commit a45b695b9fcfbbb0a087222abc5c8d691a7d2770)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit fdcd53fe1a8a7f052d7217c36b2597df06b6e016)
Co-authored-by: Daniel Hahler <git@thequod.de>
|
| |
|
|
|
|
| |
Automerge-Triggered-By: @pablogsal
(cherry picked from commit 6df421fe87a9418d6c59f89dbc5d5573b6826855)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 57c7a0bdf4f7da8cf47f797f075950f6b8c98b99)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
| |
|
|
|
|
| |
The current content is not rendered since the syntax is not correct.
(cherry picked from commit d4d17fd2cf69e7c8f4cd03fbf2d575370945b952)
Co-authored-by: Julien Danjou <julien@danjou.info>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst.
Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007. Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`.
Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`.
https://bugs.python.org/issue38374
(cherry picked from commit 4eb9f4313cfaea6a9611221024a1c54f5662cc37)
Co-authored-by: Roger Hurwitz <rogerhurwitz@gmail.com>
|
| |
|
|
|
|
|
|
| |
(cherry picked from commit 47be7d0108b4021ede111dbd15a095c725be46b7)
Co-authored-by: Keith Erskine <toastie604@gmail.com>
Co-authored-by: Keith Erskine <toastie604@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
The added parentheses around the PyIter_Next assignment suppress the following warning which gcc throws without:
```
warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
```
The other change is a typo fix
(cherry picked from commit 5c7ed7550ec2da16d7679e538fcd7c1a5631811f)
Co-authored-by: William Ayd <william.ayd@icloud.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Fixed an incorrect sentence in Doc/c-api/mapping.rst I fell on
while translating the file.
skip issue
Automerge-Triggered-By: @csabella
(cherry picked from commit 06ca2a2be9374ac390e9407685ccce941ab9ffa2)
Co-authored-by: Aveheuzed <a.masson555@ntymail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-17027)
This was never intented to be called manually from PyInit_*.
Also, clarify PyState_RemoveModule return value.
(cherry picked from commit 9bc94eca0c69a551f928692364a99e9b67c4a45b)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
https://bugs.python.org/issue38159
Automerge-Triggered-By: @encukou
|
| |
|
|
|
| |
Also fix some other formatting.
(cherry picked from commit e835b31d2b212c3c7820364398979cae2a9740b2)
|
| |
|
|
|
|
|
| |
(GH-16950) (GH-17000)
Replace all *NULL* with ``NULL``.
(cherry picked from commit 25fc088607c855060ed142296dc1bd0125fad1af)
|
| |
|
|
|
| |
(cherry picked from commit d898d20e8c228229eb68e545f544db13f246f216)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 57b7dbc46e71269d855e644d30826d33eedee2a1)
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add a note to the PyModule_AddObject docs.
* Correct example usages of PyModule_AddObject.
* Whitespace.
* Clean up wording.
* 📜🤖 Added by blurb_it.
* First code review.
* Add < 0 in the tests with PyModule_AddObject
(cherry picked from commit 224b8aaa7e8f67f748e8b7b6a4a77a25f6554651)
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
|
| |
|
|
|
|
| |
https://bugs.python.org/issue37698
(cherry picked from commit 15f5a7527b87e11fcf23069c147fd4cb7d42cfb0)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
|
|
|
| |
https://bugs.python.org/issue37750
Automerge-Triggered-By: @matrixise
(cherry picked from commit 5a56ce4a0e820fefcd598b94715a7ff7e199858d)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit b6dafe51399f5c6313a00529118a6052b466942f)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 1b29af83bc17e773b0c0d117f5fe1018fde46b0d)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit bd26a4466b507e196fc9a5e4a6cb7cd6d39f85aa)
Co-authored-by: Joseph Fox-Rabinovitz <madphysicist@users.noreply.github.com>
|
| |
|
|
|
|
| |
0 is a legal index.
(cherry picked from commit f8709e804d16ec5d44b1d2f00d59a0f78df7b792)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
|
|
| |
(cherry picked from commit 39a5d17a7f1387582eb484422df450bc09a5543e)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit aeecf380660ea459d85bb5f59d76bb54f757b5be)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit b4bee03087a3c70cb040e2ce569c828860ed8e87)
Co-authored-by: Hai Shi <shihai1992@gmail.com>
|
| |
|
|
|
|
| |
Mention explicitly that PyObject_CallXXX() functions raise an
exception an failure.
(cherry picked from commit 1ce2656f13e726b3b99d4c968926908cff1f460a)
|
| |
|
|
|
| |
(cherry picked from commit 5600b5e1b24a3491e83f1b3038a7ea047a34c0bf)
Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be>
|
| |
|
|
|
|
|
| |
(GH-13860) (GH-13896)
(cherry picked from commit dc2476500d91082f0c907772c83a044bf49af279)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
| |
handled (GH-7778)
``_thread.interrupt_main()`` now avoids setting the Python error status if the ``SIGINT`` signal is ignored or not handled by Python.
(cherry picked from commit 608876b6b1eb59538e6c29671a733033fb8b5be7)
Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
PyErr_WriteUnraisable() now displays the exception even if displaying
the traceback failed. Moreover, hold a strong reference to sys.stderr
while using it.
Document that an exception must be set when calling
PyErr_WriteUnraisable(), but don't add an assertion to check it at
runtime.
Cleanup: use longer names for variables and create
write_unraisable_exc_file() subfunction.
|
| |
|
|
|
| |
(cherry picked from commit d28772ab6967fea136c0707f0207673ebad66f61)
Co-authored-by: Edison A <20975616+SimiCode@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
Update 'unicode' capitalization. 'Unicode' is a proper noun, and as such should be capitalized.
Changed multiple instances.
(cherry picked from commit 85225b6a58a516c50c055d5114668ed2fcdcda8c)
Co-authored-by: toonarmycaptain <toonarmycaptain@hotmail.com>
|
| |
|
|
|
|
|
| |
PyDateTime_FromDateAndTimeAndFold (GH-13147)
(cherry picked from commit 5765ecf79fcee987f2f97c246c64b494324dfd33)
Co-authored-by: Edison A <20975616+SimiCode@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
can terminate the calling thread (GH-12541) (GH-12820)
Calling these function from a thread when the runtime is finalizing will terminate
the thread, even if the thread was not created by Python. Users can use
_Py_IsFinalizing or sys.is_finalizing to check if the interpreter is in the process of
being finalized before calling this function to avoid unwanted termination.
(cherry picked from commit fde9b33)
|
| |
|
|
|
| |
(cherry picked from commit c88feceb449d6e85d7e17ec36559206094d10d81)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-12770) (GH-12788)
* bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)
Replace _PyMem_IsFreed() function with _PyMem_IsPtrFreed() inline
function. The function is now way more efficient, it became a simple
comparison on integers, rather than a short loop. It detects also
uninitialized bytes and "forbidden bytes" filled by debug hooks
on memory allocators.
Add unit tests on _PyObject_IsFreed().
(cherry picked from commit 2b00db68554422ec37faba2a80179a0172df6349)
* bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().
(cherry picked from commit 4c409beb4c360a73d054f37807d3daad58d1b567)
|
| |
|
|
|
| |
(cherry picked from commit f4efa312d14bc792f59514c5696e29041e05deca)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
I have added documentation for `PyInterpreterState_Main()`.
I chose to place it under Advanced Debugger Support together with similar functions like `PyInterpreterState_Head()`, `PyInterpreterState_Next(`), and `PyInterpreterState_ThreadHead()` .
https://bugs.python.org/issue36157
(cherry picked from commit 8c61739defd88c7f79e86537886c33745843ce01)
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
|
| |
|
| |
(cherry picked from commit 10654c19b5e6efdf3c529ff9bf7bcab89bdca1c1)
|
| |
|
|
|
| |
(cherry picked from commit ddbb978e1065dde21d1662386b26ded359f4b16e)
Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit ecc161d1209bf6d21f0fd6bef28476eda7cdaf79)
Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
|
| |
|
|
|
|
|
|
| |
Did you know an API documented as printing the pending traceback would sometimes exit the process?
You do now.
(cherry picked from commit 4173772031747a9b249be4100b4aa9eda805ea23)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
|
| |
|
|
|
|
|
| |
(GH-11929)
(cherry picked from commit d90a141bb947b68601f8d1f37bc98f7b524f0e01)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 57dd79e6f7f33bb4e6817ac58c9cb91de99675e0)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 3fcc1e08db6fb7e17acc4a8f63be3e42f52f094b)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 55f41e45b4318cbe19209f5144641344d0049fb8)
Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit a40700439195a119878150f4f0d425c42ca957ef)
Co-authored-by: Kevin Adler <kadler@us.ibm.com>
|
| |
|
|
|
|
| |
PyType_GetFlags() return type is unsigned long, not long.
(cherry picked from commit 9fbcfc08e5814d7aa9287740187e461425a99f67)
Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as (GH-10580) (GH-10586)
Source of T_STRING: https://github.com/python/cpython/blob/e42b705188271da108de42b55d9344642170aa2b/Python/structmember.cGH-L51
Source of PyUnicode_FromString
https://github.com/python/cpython/blob/master/Include/unicodeobject.hGH-L702
https://bugs.python.org/issue25438
(cherry picked from commit 689d555ec135d4115574addd063c358ac4897cc4)
Co-authored-by: Windson yang <wiwindson@outlook.com>
https://bugs.python.org/issue25438
|
| |
|
|
|
| |
Deprecate _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() in the
documentation. These macros are removed from Python 3.8 by the commit
1a6be91e6fd65ce9cb88cbbbb193db7e92ec6076.
|