<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules/_threadmodule.c, branch enum-lost-fixes</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>[3.10] Fix typos in the Modules directory (GH-28761) (GH-28781)</title>
<updated>2021-10-07T08:55:18+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-10-07T08:55:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=5afc5bb45d614ea4a512e257b6b60e4f98185043'/>
<id>5afc5bb45d614ea4a512e257b6b60e4f98185043</id>
<content type='text'>
(cherry picked from commit dd02a696e55b450413e765e698e653d781ca4205)


Co-authored-by: Christian Clauss &lt;cclauss@me.com&gt;

Automerge-Triggered-By: GH:gpshead</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit dd02a696e55b450413e765e698e653d781ca4205)


Co-authored-by: Christian Clauss &lt;cclauss@me.com&gt;

Automerge-Triggered-By: GH:gpshead</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26824)</title>
<updated>2021-06-21T12:29:17+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-06-21T12:29:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=6614eac843c5dc0f4c2664ef610b81e556e44923'/>
<id>6614eac843c5dc0f4c2664ef610b81e556e44923</id>
<content type='text'>
_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.

On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:

"libgcc_s.so.1 must be installed for pthread_cancel to work"

pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.

The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.

Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.
(cherry picked from commit 45a78f906d2d5fe5381d78466b11763fc56d57ba)

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.

On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:

"libgcc_s.so.1 must be installed for pthread_cancel to work"

pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.

The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.

Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.
(cherry picked from commit 45a78f906d2d5fe5381d78466b11763fc56d57ba)

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) (GH-26766)</title>
<updated>2021-06-17T10:19:44+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-06-17T10:19:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=7297d74251de3b1c02dcdb9ca281461cc7fb4535'/>
<id>7297d74251de3b1c02dcdb9ca281461cc7fb4535</id>
<content type='text'>
* Make functools types immutable

* Multibyte codec types are now immutable

* pyexpat.xmlparser is now immutable

* array.arrayiterator is now immutable

* _thread types are now immutable

* _csv types are now immutable

* _queue.SimpleQueue is now immutable

* mmap.mmap is now immutable

* unicodedata.UCD is now immutable

* sqlite3 types are now immutable

* _lsprof.Profiler is now immutable

* _overlapped.Overlapped is now immutable

* _operator types are now immutable

* winapi__overlapped.Overlapped is now immutable

* _lzma types are now immutable

* _bz2 types are now immutable

* _dbm.dbm and _gdbm.gdbm are now immutable
(cherry picked from commit 00710e6346fd2394aa020b2dfae170093effac98)

Co-authored-by: Erlend Egeberg Aasland &lt;erlend.aasland@innova.no&gt;

Co-authored-by: Erlend Egeberg Aasland &lt;erlend.aasland@innova.no&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Make functools types immutable

* Multibyte codec types are now immutable

* pyexpat.xmlparser is now immutable

* array.arrayiterator is now immutable

* _thread types are now immutable

* _csv types are now immutable

* _queue.SimpleQueue is now immutable

* mmap.mmap is now immutable

* unicodedata.UCD is now immutable

* sqlite3 types are now immutable

* _lsprof.Profiler is now immutable

* _overlapped.Overlapped is now immutable

* _operator types are now immutable

* winapi__overlapped.Overlapped is now immutable

* _lzma types are now immutable

* _bz2 types are now immutable

* _dbm.dbm and _gdbm.gdbm are now immutable
(cherry picked from commit 00710e6346fd2394aa020b2dfae170093effac98)

Co-authored-by: Erlend Egeberg Aasland &lt;erlend.aasland@innova.no&gt;

Co-authored-by: Erlend Egeberg Aasland &lt;erlend.aasland@innova.no&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-42972: _thread.RLock implements the GH protocol (GH-26734)</title>
<updated>2021-06-15T13:29:44+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-06-15T13:29:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=e30fe27dabbc6b48736c3c17d57f6fa542376e8f'/>
<id>e30fe27dabbc6b48736c3c17d57f6fa542376e8f</id>
<content type='text'>
The _thread.RLock type now fully implement the GC protocol: add a
traverse function and the Py_TPFLAGS_HAVE_GC flag.
(cherry picked from commit 1cd3d859a49b047dd08abb6f44f0539564d3525a)

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The _thread.RLock type now fully implement the GC protocol: add a
traverse function and the Py_TPFLAGS_HAVE_GC flag.
(cherry picked from commit 1cd3d859a49b047dd08abb6f44f0539564d3525a)

Co-authored-by: Victor Stinner &lt;vstinner@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43916: Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to selected types (GH-25748)</title>
<updated>2021-04-30T14:04:57+00:00</updated>
<author>
<name>Erlend Egeberg Aasland</name>
<email>erlend.aasland@innova.no</email>
</author>
<published>2021-04-30T14:04:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=9746cda705decebc0ba572d95612796afd06dcd4'/>
<id>9746cda705decebc0ba572d95612796afd06dcd4</id>
<content type='text'>
Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to the following types:

* _dbm.dbm
* _gdbm.gdbm
* _multibytecodec.MultibyteCodec
* _sre..SRE_Scanner
* _thread._localdummy
* _thread.lock
* _winapi.Overlapped
* array.arrayiterator
* functools.KeyWrapper
* functools._lru_list_elem
* pyexpat.xmlparser
* re.Match
* re.Pattern
* unicodedata.UCD
* zlib.Compress
* zlib.Decompress
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to the following types:

* _dbm.dbm
* _gdbm.gdbm
* _multibytecodec.MultibyteCodec
* _sre..SRE_Scanner
* _thread._localdummy
* _thread.lock
* _winapi.Overlapped
* array.arrayiterator
* functools.KeyWrapper
* functools._lru_list_elem
* pyexpat.xmlparser
* re.Match
* re.Pattern
* unicodedata.UCD
* zlib.Compress
* zlib.Decompress
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40137: Add pycore_moduleobject.h internal header (GH-25507)</title>
<updated>2021-04-21T22:52:52+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-04-21T22:52:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=cdad2724e6f7426372901cc5dedd8a462ba046a6'/>
<id>cdad2724e6f7426372901cc5dedd8a462ba046a6</id>
<content type='text'>
Add pycore_moduleobject.h internal header file with static inline
functions to access module members:

* _PyModule_GetDict()
* _PyModule_GetDef()
* _PyModule_GetState()

These functions don't check at runtime if their argument has a valid
type and can be inlined even if Python is not built with LTO.

_PyType_GetModuleByDef() uses _PyModule_GetDef().

Replace PyModule_GetState() with _PyModule_GetState() in the
extension modules, considered as performance sensitive:

* _abc
* _functools
* _operator
* _pickle
* _queue
* _random
* _sre
* _struct
* _thread
* _winapi
* array
* posix

The following extensions are now built with the Py_BUILD_CORE_MODULE
macro defined, to be able to use the internal pycore_moduleobject.h
header: _abc, array, _operator, _queue, _sre, _struct.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add pycore_moduleobject.h internal header file with static inline
functions to access module members:

* _PyModule_GetDict()
* _PyModule_GetDef()
* _PyModule_GetState()

These functions don't check at runtime if their argument has a valid
type and can be inlined even if Python is not built with LTO.

_PyType_GetModuleByDef() uses _PyModule_GetDef().

Replace PyModule_GetState() with _PyModule_GetState() in the
extension modules, considered as performance sensitive:

* _abc
* _functools
* _operator
* _pickle
* _queue
* _random
* _sre
* _struct
* _thread
* _winapi
* array
* posix

The following extensions are now built with the Py_BUILD_CORE_MODULE
macro defined, to be able to use the internal pycore_moduleobject.h
header: _abc, array, _operator, _queue, _sre, _struct.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43356: Allow passing a signal number to interrupt_main() (GH-24755)</title>
<updated>2021-03-11T22:35:45+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>antoine@python.org</email>
</author>
<published>2021-03-11T22:35:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ba251c2ae6654bfc8abd9d886b219698ad34ac3c'/>
<id>ba251c2ae6654bfc8abd9d886b219698ad34ac3c</id>
<content type='text'>
Also introduce a new C API ``PyErr_SetInterruptEx(int signum)``.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also introduce a new C API ``PyErr_SetInterruptEx(int signum)``.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43268: local_clear() uses _PyInterpreterState_GET() (GH-24583)</title>
<updated>2021-02-19T14:51:36+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-02-19T14:51:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=839184f85cb2d2ad514fff9b431733d1c9607533'/>
<id>839184f85cb2d2ad514fff9b431733d1c9607533</id>
<content type='text'>
Cleanup also the code.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup also the code.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-1635741: Port _thread to multiphase init (GH-23811)</title>
<updated>2020-12-18T00:39:00+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-12-18T00:39:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=6104013838e181e3c698cb07316f449a0c31ea96'/>
<id>6104013838e181e3c698cb07316f449a0c31ea96</id>
<content type='text'>
Port the _thread extension module to the multiphase initialization
API (PEP 489) and convert its static types to heap types.

Add a traverse function to the lock type, so the garbage collector
can break reference cycles.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Port the _thread extension module to the multiphase initialization
API (PEP 489) and convert its static types to heap types.

Add a traverse function to the lock type, so the garbage collector
can break reference cycles.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-1635741: Refactor _threadmodule.c (GH-23793)</title>
<updated>2020-12-16T11:20:33+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-12-16T11:20:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=8203c73f3bb1f51614279b6e23af2ec587d1fa22'/>
<id>8203c73f3bb1f51614279b6e23af2ec587d1fa22</id>
<content type='text'>
* Fix ExceptHookArgsType name: "_thread.ExceptHookArgs", instead of
  "_thread._ExceptHookArgs".
* PyInit__thread() no longer intializes interp-&gt;num_threads to 0:
  it is already done in PyInterpreterState_New().
* Use PyModule_AddType(), Py_NewRef() and Py_XNewRef().
* Replace str_dict variable with _Py_IDENTIFIER(__dict__).
* Remove assert(Py_IS_TYPE(obj, &amp;Locktype)) from release_sentinel()
  to avoid having to retrive the type from this callback.
* Add thread_bootstate_free()
* Rename t_bootstrap() to thread_run()
* bootstate structure: rename keyw member to kwargs</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix ExceptHookArgsType name: "_thread.ExceptHookArgs", instead of
  "_thread._ExceptHookArgs".
* PyInit__thread() no longer intializes interp-&gt;num_threads to 0:
  it is already done in PyInterpreterState_New().
* Use PyModule_AddType(), Py_NewRef() and Py_XNewRef().
* Replace str_dict variable with _Py_IDENTIFIER(__dict__).
* Remove assert(Py_IS_TYPE(obj, &amp;Locktype)) from release_sentinel()
  to avoid having to retrive the type from this callback.
* Add thread_bootstate_free()
* Rename t_bootstrap() to thread_run()
* bootstate structure: rename keyw member to kwargs</pre>
</div>
</content>
</entry>
</feed>
