<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_capi.py, branch 3.8</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_capi.py?h=3.8</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_capi.py?h=3.8'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2020-07-05T20:12:04Z</updated>
<entry>
<title>bpo-39960: Allow heap types in the "Carlo Verre" hack check that override "tp_setattro()" (GH-21092) (GH-21339)</title>
<updated>2020-07-05T20:12:04Z</updated>
<author>
<name>scoder</name>
<email>stefan_ml@behnel.de</email>
</author>
<published>2020-07-05T20:12:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8912c182455de83e27d5c120639ec91b18247913'/>
<id>urn:sha1:8912c182455de83e27d5c120639ec91b18247913</id>
<content type='text'>
Backport to Py3.8.</content>
</entry>
<entry>
<title>[3.8] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags (#21023)</title>
<updated>2020-06-28T00:35:05Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2020-06-28T00:35:05Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e653369e76d7da6bcbcf1f09a141f47fb77df6c3'/>
<id>urn:sha1:e653369e76d7da6bcbcf1f09a141f47fb77df6c3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[3.8] bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called with invalid base. (GH-18863). (GH-18954)</title>
<updated>2020-03-12T07:30:56Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2020-03-12T07:30:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ab9c72912178cfdb4d0637be036d78913b769154'/>
<id>urn:sha1:ab9c72912178cfdb4d0637be036d78913b769154</id>
<content type='text'>
(cherry picked from commit e5ccc94bbb153431698b2391df625e8d47a93276)
</content>
</entry>
<entry>
<title>bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)</title>
<updated>2019-11-21T12:11:44Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-11-21T12:11:44Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=767b42633bb7ac39dd6743d8dd7f5b5cc122acea'/>
<id>urn:sha1:767b42633bb7ac39dd6743d8dd7f5b5cc122acea</id>
<content type='text'>
test_capi: trashcan tests now require the test "cpu" resource.
(cherry picked from commit 0127bb1c5c3286f87e284ff6083133bfdcfd5a4f)

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;</content>
</entry>
<entry>
<title>[3.8] bpo-36389: Backport debug enhancements from master (GH-16796)</title>
<updated>2019-10-15T01:06:16Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2019-10-15T01:06:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f82ce5b1b12873b65927149a016be6a7c65e979d'/>
<id>urn:sha1:f82ce5b1b12873b65927149a016be6a7c65e979d</id>
<content type='text'>
* bpo-36389: _PyObject_CheckConsistency() available in release mode (GH-16612)

bpo-36389, bpo-38376: The _PyObject_CheckConsistency() function is
now also available in release mode. For example, it can be used to
debug a crash in the visit_decref() function of the GC.

Modify the following functions to also work in release mode:

* _PyDict_CheckConsistency()
* _PyObject_CheckConsistency()
* _PyType_CheckConsistency()
* _PyUnicode_CheckConsistency()

Other changes:

* _PyMem_IsPtrFreed(ptr) now also returns 1 if ptr is NULL
  (equals to 0).
* _PyBytesWriter_CheckConsistency() now returns 1 and is only used
  with assert().
* Reorder _PyObject_Dump() to write safe fields first, and only
  attempt to render repr() at the end.

(cherry picked from commit 6876257eaabdb30f27ebcbd7d2557278ce2e5705)

* bpo-36389: Fix _PyBytesWriter in release mode (GH-16624)

Fix _PyBytesWriter API when Python is built in release mode with
assertions.

(cherry picked from commit 60ec6efd96d95476fe5e38c491491add04f026e5)

* bpo-38070: Enhance visit_decref() debug trace (GH-16631)

subtract_refs() now pass the parent object to visit_decref() which
pass it to _PyObject_ASSERT(). So if the "is freed" assertion fails,
the parent is used in debug trace, rather than the freed object. The
parent object is more likely to contain useful information. Freed
objects cannot be inspected are are displayed as "&lt;object at xxx is
freed&gt;" with no other detail.

(cherry picked from commit 4d5f94b8cd20f804c7868c5395a15aa6032f874c)

* Fix also a typo in PYMEM_DEADBYTE macro comment

* bpo-36389: Add newline to _PyObject_AssertFailed() (GH-16629)

Add a newline between the verbose object dump and the Py_FatalError()
logs for readability.

(cherry picked from commit 7775349895088a7ae68cecf0c74cf817f15e2c74)
</content>
</entry>
<entry>
<title>[3.8] bpo-38070: Py_FatalError() logs runtime state (GH-16258)</title>
<updated>2019-09-18T12:10:16Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-09-18T12:10:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=47bbab9f76735acc1991e541d12fd18be6b13b16'/>
<id>urn:sha1:47bbab9f76735acc1991e541d12fd18be6b13b16</id>
<content type='text'>
* bpo-38070: _Py_DumpTraceback() writes &lt;no Python frame&gt; (GH-16244)

When a Python thread has no frame, _Py_DumpTraceback() and
_Py_DumpTracebackThreads() now write "&lt;no Python frame&gt;", rather than
writing nothing.

(cherry picked from commit 8fa3e1740b3f03ea65ddb68411c2238c5f98eec2)

* bpo-38070: Enhance _PyObject_Dump() (GH-16243)

_PyObject_Dump() now dumps the object address for freed objects and
objects with ob_type=NULL.

(cherry picked from commit b39afb78768418d9405c4b528c80fa968ccc974d)

* bpo-38070: Add _PyRuntimeState.preinitializing (GH-16245)

Add _PyRuntimeState.preinitializing field: set to 1 while
Py_PreInitialize() is running.

_PyRuntimeState: rename also pre_initialized field to preinitialized.

(cherry picked from commit d3b904144e86e2442961de6a7dccecbe133d5c6d)

* bpo-38070: Py_FatalError() logs runtime state (GH-16246)


(cherry picked from commit 1ce16fb0977283ae42a9f8917bbca5f44aa69324)
</content>
</entry>
<entry>
<title>[3.8] bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type (GH-15323, GH-16004) (GH-15966)</title>
<updated>2019-09-12T09:44:46Z</updated>
<author>
<name>Petr Viktorin</name>
<email>encukou@gmail.com</email>
</author>
<published>2019-09-12T09:44:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3562ae25402aad36583bc27d4d82c67554323d5e'/>
<id>urn:sha1:3562ae25402aad36583bc27d4d82c67554323d5e</id>
<content type='text'>
The instance destructor for a type is responsible for preparing
an instance for deallocation by decrementing the reference counts
of its referents.

If an instance belongs to a heap type, the type object of an instance
has its reference count decremented while for static types, which
are permanently allocated, the type object is unaffected by the
instance destructor.

Previously, the default instance destructor searched the class
hierarchy for an inherited instance destructor and, if present,
would invoke it.

Then, if the instance type is a heap type, it would decrement the
reference count of that heap type.  However, this could result in the
premature destruction of a type because the inherited instance
destructor should have already decremented the reference count
of the type object.

This change avoids the premature destruction of the type object
by suppressing the decrement of its reference count when an
inherited, non-default instance destructor has been invoked.

Finally, an assertion on the Py_SIZE of a type was deleted.  Heap
types have a non zero size, making this into an incorrect assertion.

https://github.com/python/cpython/pull/15323.
(cherry picked from commit ff023ed36ea260ab64be5895f1f1f087c798987a)
Fixup: https://github.com/python/cpython/pull/16004.
(cherry picked from commit 5e9caeec76119a0d61c25f1466c27b7dbd5115bd)

Co-authored-by: Eddie Elizondo &lt;eduardo.elizondorueda@gmail.com&gt;
</content>
</entry>
<entry>
<title>Remove unused imports in tests (GH-14518) (GH-14520)</title>
<updated>2019-07-01T17:01:52Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-07-01T17:01:52Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=466e18e8c2738b06a24915cb186d954821d0414f'/>
<id>urn:sha1:466e18e8c2738b06a24915cb186d954821d0414f</id>
<content type='text'>
(cherry picked from commit 8f4ef3b019ce380022018587571b0f970e668de3)</content>
</entry>
<entry>
<title>bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)</title>
<updated>2019-06-07T16:13:16Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-06-07T16:13:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=5effd10bf14ab0a8a6695100aaf0b687eca68e6d'/>
<id>urn:sha1:5effd10bf14ab0a8a6695100aaf0b687eca68e6d</id>
<content type='text'>
(cherry picked from commit 740a84de73ad8d02655de0a084036f4b7e49a01b)

Co-authored-by: Victor Stinner &lt;vstinner@redhat.com&gt;</content>
</entry>
<entry>
<title>bpo-37169: Rewrite _PyObject_IsFreed() unit tests (GH-13888) (GH-13895)</title>
<updated>2019-06-07T15:41:39Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-06-07T15:41:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=357626676035d2bb12ea92e0edf3c7b383d627ec'/>
<id>urn:sha1:357626676035d2bb12ea92e0edf3c7b383d627ec</id>
<content type='text'>
Replace two Python function calls with a single one to ensure that no
memory allocation is done between the invalid object is created and
when _PyObject_IsFreed() is called.

(cherry picked from commit 3bf0f3ad2046ac674d8e8a2c074a5a8b3327797d)</content>
</entry>
</feed>
