<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules/_xxsubinterpretersmodule.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>bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag (GH-25721)</title>
<updated>2021-04-30T10:46:15+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2021-04-30T10:46:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3bb09947ec4837de75532e21dd4bd25db0a1f1b7'/>
<id>3bb09947ec4837de75532e21dd4bd25db0a1f1b7</id>
<content type='text'>
Add a new Py_TPFLAGS_DISALLOW_INSTANTIATION type flag to disallow
creating type instances: set tp_new to NULL and don't create the
"__new__" key in the type dictionary.

The flag is set automatically on static types if tp_base is NULL or
&amp;PyBaseObject_Type and tp_new is NULL.

Use the flag on the following types:

* _curses.ncurses_version type
* _curses_panel.panel
* _tkinter.Tcl_Obj
* _tkinter.tkapp
* _tkinter.tktimertoken
* _xxsubinterpretersmodule.ChannelID
* sys.flags type
* sys.getwindowsversion() type
* sys.version_info type

Update MyStr example in the C API documentation to use
Py_TPFLAGS_DISALLOW_INSTANTIATION.

Add _PyStructSequence_InitType() function to create a structseq type
with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag set.

type_new() calls _PyType_CheckConsistency() at exit.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new Py_TPFLAGS_DISALLOW_INSTANTIATION type flag to disallow
creating type instances: set tp_new to NULL and don't create the
"__new__" key in the type dictionary.

The flag is set automatically on static types if tp_base is NULL or
&amp;PyBaseObject_Type and tp_new is NULL.

Use the flag on the following types:

* _curses.ncurses_version type
* _curses_panel.panel
* _tkinter.Tcl_Obj
* _tkinter.tkapp
* _tkinter.tktimertoken
* _xxsubinterpretersmodule.ChannelID
* sys.flags type
* sys.getwindowsversion() type
* sys.version_info type

Update MyStr example in the C API documentation to use
Py_TPFLAGS_DISALLOW_INSTANTIATION.

Add _PyStructSequence_InitType() function to create a structseq type
with the Py_TPFLAGS_DISALLOW_INSTANTIATION flag set.

type_new() calls _PyType_CheckConsistency() at exit.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-43472: Ensure PyInterpreterState_New audit events are raised when called through _xxsubinterpreters module (GH-25506)</title>
<updated>2021-04-21T22:34:29+00:00</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@python.org</email>
</author>
<published>2021-04-21T22:34:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=7b86e47617d81a4b14d929743425f448971e8c86'/>
<id>7b86e47617d81a4b14d929743425f448971e8c86</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40941: Unify implicit and explicit state in the frame and generator objects into a single value. (GH-20803)</title>
<updated>2020-07-17T10:44:23+00:00</updated>
<author>
<name>Mark Shannon</name>
<email>mark@hotpy.org</email>
</author>
<published>2020-07-17T10:44:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=cb9879b948a19c9434316f8ab6aba9c4601a8173'/>
<id>cb9879b948a19c9434316f8ab6aba9c4601a8173</id>
<content type='text'>
* Merge gen and frame state variables into one.

* Replace stack pointer with depth in PyFrameObject. Makes code easier to read and saves a word of memory.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Merge gen and frame state variables into one.

* Replace stack pointer with depth in PyFrameObject. Makes code easier to read and saves a word of memory.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" (GH-20089)</title>
<updated>2020-05-14T16:46:24+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-05-14T16:46:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f2c3b6823bc4777d4a14eb0c3615b719521f763a'/>
<id>f2c3b6823bc4777d4a14eb0c3615b719521f763a</id>
<content type='text'>
* Revert "bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069)"

This reverts commit fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6.

* Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)"

This reverts commit a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Revert "bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069)"

This reverts commit fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6.

* Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)"

This reverts commit a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069)</title>
<updated>2020-05-13T13:38:27+00:00</updated>
<author>
<name>Dong-hee Na</name>
<email>donghee.na92@gmail.com</email>
</author>
<published>2020-05-13T13:38:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6'/>
<id>fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)</title>
<updated>2020-05-07T14:56:01+00:00</updated>
<author>
<name>Eric Snow</name>
<email>ericsnowcurrently@gmail.com</email>
</author>
<published>2020-05-07T14:56:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57'/>
<id>a1d9e0accd33af1d8e90fc48b34c13d7b07dcf57</id>
<content type='text'>
(Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.)

If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, __cause__, __context__, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately).

This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to __cause__ on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original __cause__, __context__, and __traceback__ (since "pickle" does not preserve those).

https://bugs.python.org/issue32604</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.)

If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, __cause__, __context__, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately).

This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to __cause__ on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original __cause__, __context__, and __traceback__ (since "pickle" does not preserve those).

https://bugs.python.org/issue32604</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40513: _xxsubinterpreters.run_string() releases the GIL (GH-19944)</title>
<updated>2020-05-05T18:33:06+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-05-05T18:33:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=fb2c7c4afbab0514352ab0246b0c0cc85d1bba53'/>
<id>fb2c7c4afbab0514352ab0246b0c0cc85d1bba53</id>
<content type='text'>
In the experimental isolated subinterpreters build mode,
_xxsubinterpreters.run_string() now releases the GIL.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the experimental isolated subinterpreters build mode,
_xxsubinterpreters.run_string() now releases the GIL.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40453: Add PyConfig._isolated_subinterpreter (GH-19820)</title>
<updated>2020-05-01T09:33:44+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-05-01T09:33:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=252346acd937ddba4845331994b8ff4f90349625'/>
<id>252346acd937ddba4845331994b8ff4f90349625</id>
<content type='text'>
An isolated subinterpreter cannot spawn threads, spawn a child
process or call os.fork().

* Add private _Py_NewInterpreter(isolated_subinterpreter) function.
* Add isolated=True keyword-only parameter to
  _xxsubinterpreters.create().
* Allow again os.fork() in "non-isolated" subinterpreters.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
An isolated subinterpreter cannot spawn threads, spawn a child
process or call os.fork().

* Add private _Py_NewInterpreter(isolated_subinterpreter) function.
* Add isolated=True keyword-only parameter to
  _xxsubinterpreters.create().
* Allow again os.fork() in "non-isolated" subinterpreters.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40429: PyThreadState_GetFrame() returns a strong ref (GH-19781)</title>
<updated>2020-04-29T01:01:43+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-04-29T01:01:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=4386b9045e5fe1151e65c2816264b5710000eb9f'/>
<id>4386b9045e5fe1151e65c2816264b5710000eb9f</id>
<content type='text'>
The PyThreadState_GetFrame() function now returns a strong reference
to the frame.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PyThreadState_GetFrame() function now returns a strong reference
to the frame.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38880: List interpreters associated with a channel end (GH-17323)</title>
<updated>2020-04-29T00:18:42+00:00</updated>
<author>
<name>Lewis Gaul</name>
<email>Lewis@scphillips.com</email>
</author>
<published>2020-04-29T00:18:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f7bbf58aa9299e9dd00b7a1bdd1113b4dcb6dfdf'/>
<id>f7bbf58aa9299e9dd00b7a1bdd1113b4dcb6dfdf</id>
<content type='text'>
This PR adds the functionality requested by https://github.com/ericsnowcurrently/multi-core-python/issues/52.

Automerge-Triggered-By: @ericsnowcurrently</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR adds the functionality requested by https://github.com/ericsnowcurrently/multi-core-python/issues/52.

Automerge-Triggered-By: @ericsnowcurrently</pre>
</div>
</content>
</entry>
</feed>
