<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/errors.c, branch misc-acks-comment</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisable hooks are invoked (GH-17392)</title>
<updated>2019-11-28T16:46:11+00:00</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@python.org</email>
</author>
<published>2019-11-28T16:46:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=bea33f5e1db6e4a554919a82894f44568576e979'/>
<id>bea33f5e1db6e4a554919a82894f44568576e979</id>
<content type='text'>
Also fixes some potential segfaults in unraisable hook handling.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fixes some potential segfaults in unraisable hook handling.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38733: PyErr_Occurred() caller must hold the GIL (GH-17080)</title>
<updated>2019-11-07T11:42:07+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2019-11-07T11:42:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d12d0e7c0fe2b49c40ac4d66365147c619d6c475'/>
<id>d12d0e7c0fe2b49c40ac4d66365147c619d6c475</id>
<content type='text'>
bpo-3605, bpo-38733: Optimize _PyErr_Occurred(): remove "tstate ==
NULL" test.

Py_FatalError() no longer calls PyErr_Occurred() if called without
holding the GIL. So PyErr_Occurred() no longer has to support
tstate==NULL case.

_Py_CheckFunctionResult(): use directly _PyErr_Occurred() to avoid
explicit "!= NULL" test.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bpo-3605, bpo-38733: Optimize _PyErr_Occurred(): remove "tstate ==
NULL" test.

Py_FatalError() no longer calls PyErr_Occurred() if called without
holding the GIL. So PyErr_Occurred() no longer has to support
tstate==NULL case.

_Py_CheckFunctionResult(): use directly _PyErr_Occurred() to avoid
explicit "!= NULL" test.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38644: Pass tstate to _Py_CheckFunctionResult() (GH-17050)</title>
<updated>2019-11-05T00:22:12+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2019-11-05T00:22:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=17269090940aa20f6079a6b9f27ae319f8cdae14'/>
<id>17269090940aa20f6079a6b9f27ae319f8cdae14</id>
<content type='text'>
* Add tstate parameter to _Py_CheckFunctionResult()
* Add _PyErr_FormatFromCauseTstate()
* Replace PyErr_XXX(...) with _PyErr_XXX(state, ...)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add tstate parameter to _Py_CheckFunctionResult()
* Add _PyErr_FormatFromCauseTstate()
* Replace PyErr_XXX(...) with _PyErr_XXX(state, ...)</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)</title>
<updated>2019-07-08T08:19:25+00:00</updated>
<author>
<name>Jeroen Demeyer</name>
<email>J.Demeyer@UGent.be</email>
</author>
<published>2019-07-08T08:19:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=762f93ff2efd6b7ef0177cad57939c0ab2002eac'/>
<id>762f93ff2efd6b7ef0177cad57939c0ab2002eac</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37483: add _PyObject_CallOneArg() function (#14558)</title>
<updated>2019-07-04T10:31:34+00:00</updated>
<author>
<name>Jeroen Demeyer</name>
<email>J.Demeyer@UGent.be</email>
</author>
<published>2019-07-04T10:31:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=196a530e00d88a138973bf9182e013937e293f97'/>
<id>196a530e00d88a138973bf9182e013937e293f97</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36710: Pass explicitly tstate in sysmodule.c (GH-14060)</title>
<updated>2019-06-13T20:41:23+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-06-13T20:41:23+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=838f26402de82640698c38ea9d2be65c6cf780d6'/>
<id>838f26402de82640698c38ea9d2be65c6cf780d6</id>
<content type='text'>
* Replace global var Py_VerboseFlag with interp-&gt;config.verbose.
* Add _PyErr_NoMemory(tstate) function.
* Add tstate parameter to _PyEval_SetCoroutineOriginTrackingDepth()
  and move the function to the internal API.
* Replace _PySys_InitMain(runtime, interp)
  with _PySys_InitMain(runtime, tstate).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Replace global var Py_VerboseFlag with interp-&gt;config.verbose.
* Add _PyErr_NoMemory(tstate) function.
* Add tstate parameter to _PyEval_SetCoroutineOriginTrackingDepth()
  and move the function to the internal API.
* Replace _PySys_InitMain(runtime, interp)
  with _PySys_InitMain(runtime, tstate).</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36829: sys.excepthook and sys.unraisablehook flush (GH-13620)</title>
<updated>2019-05-28T14:01:17+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-28T14:01:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=a85a1d337d26a65036e427341d15e3979f7e9ced'/>
<id>a85a1d337d26a65036e427341d15e3979f7e9ced</id>
<content type='text'>
sys.excepthook() and sys.unraisablehook() now explicitly flush the
file (usually sys.stderr).

If file.flush() fails, sys.excepthook() silently ignores the error,
whereas sys.unraisablehook() logs the new exception.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sys.excepthook() and sys.unraisablehook() now explicitly flush the
file (usually sys.stderr).

If file.flush() fails, sys.excepthook() silently ignores the error,
whereas sys.unraisablehook() logs the new exception.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36763: Implement the PEP 587 (GH-13592)</title>
<updated>2019-05-27T14:39:22+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-27T14:39:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=331a6a56e9a9c72f3e4605987fabdaec72677702'/>
<id>331a6a56e9a9c72f3e4605987fabdaec72677702</id>
<content type='text'>
* Add a whole new documentation page:
  "Python Initialization Configuration"
* PyWideStringList_Append() return type is now PyStatus,
  instead of int
* PyInterpreterState_New() now calls PyConfig_Clear() if
  PyConfig_InitPythonConfig() fails.
* Rename files:

  * Python/coreconfig.c =&gt; Python/initconfig.c
  * Include/cpython/coreconfig.h =&gt; Include/cpython/initconfig.h
  * Include/internal/: pycore_coreconfig.h =&gt; pycore_initconfig.h

* Rename structures

  * _PyCoreConfig =&gt; PyConfig
  * _PyPreConfig =&gt; PyPreConfig
  * _PyInitError =&gt; PyStatus
  * _PyWstrList =&gt; PyWideStringList

* Rename PyConfig fields:

  * use_module_search_paths =&gt; module_search_paths_set
  * module_search_path_env =&gt; pythonpath_env

* Rename PyStatus field: _func =&gt; func
* PyInterpreterState: rename core_config field to config
* Rename macros and functions:

  * _PyCoreConfig_SetArgv() =&gt; PyConfig_SetBytesArgv()
  * _PyCoreConfig_SetWideArgv() =&gt; PyConfig_SetArgv()
  * _PyCoreConfig_DecodeLocale() =&gt; PyConfig_SetBytesString()
  * _PyInitError_Failed() =&gt; PyStatus_Exception()
  * _Py_INIT_ERROR_TYPE_xxx enums =&gt; _PyStatus_TYPE_xxx
  * _Py_UnixMain() =&gt; Py_BytesMain()
  * _Py_ExitInitError() =&gt; Py_ExitStatusException()
  * _Py_PreInitializeFromArgs() =&gt; Py_PreInitializeFromBytesArgs()
  * _Py_PreInitializeFromWideArgs() =&gt; Py_PreInitializeFromArgs()
  * _Py_PreInitialize() =&gt; Py_PreInitialize()
  * _Py_RunMain() =&gt; Py_RunMain()
  * _Py_InitializeFromConfig() =&gt; Py_InitializeFromConfig()
  * _Py_INIT_XXX() =&gt; _PyStatus_XXX()
  * _Py_INIT_FAILED() =&gt; _PyStatus_EXCEPTION()

* Rename 'err' PyStatus variables to 'status'
* Convert RUN_CODE() macro to config_run_code() static inline function
* Remove functions:

  * _Py_InitializeFromArgs()
  * _Py_InitializeFromWideArgs()
  * _PyInterpreterState_GetCoreConfig()</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add a whole new documentation page:
  "Python Initialization Configuration"
* PyWideStringList_Append() return type is now PyStatus,
  instead of int
* PyInterpreterState_New() now calls PyConfig_Clear() if
  PyConfig_InitPythonConfig() fails.
* Rename files:

  * Python/coreconfig.c =&gt; Python/initconfig.c
  * Include/cpython/coreconfig.h =&gt; Include/cpython/initconfig.h
  * Include/internal/: pycore_coreconfig.h =&gt; pycore_initconfig.h

* Rename structures

  * _PyCoreConfig =&gt; PyConfig
  * _PyPreConfig =&gt; PyPreConfig
  * _PyInitError =&gt; PyStatus
  * _PyWstrList =&gt; PyWideStringList

* Rename PyConfig fields:

  * use_module_search_paths =&gt; module_search_paths_set
  * module_search_path_env =&gt; pythonpath_env

* Rename PyStatus field: _func =&gt; func
* PyInterpreterState: rename core_config field to config
* Rename macros and functions:

  * _PyCoreConfig_SetArgv() =&gt; PyConfig_SetBytesArgv()
  * _PyCoreConfig_SetWideArgv() =&gt; PyConfig_SetArgv()
  * _PyCoreConfig_DecodeLocale() =&gt; PyConfig_SetBytesString()
  * _PyInitError_Failed() =&gt; PyStatus_Exception()
  * _Py_INIT_ERROR_TYPE_xxx enums =&gt; _PyStatus_TYPE_xxx
  * _Py_UnixMain() =&gt; Py_BytesMain()
  * _Py_ExitInitError() =&gt; Py_ExitStatusException()
  * _Py_PreInitializeFromArgs() =&gt; Py_PreInitializeFromBytesArgs()
  * _Py_PreInitializeFromWideArgs() =&gt; Py_PreInitializeFromArgs()
  * _Py_PreInitialize() =&gt; Py_PreInitialize()
  * _Py_RunMain() =&gt; Py_RunMain()
  * _Py_InitializeFromConfig() =&gt; Py_InitializeFromConfig()
  * _Py_INIT_XXX() =&gt; _PyStatus_XXX()
  * _Py_INIT_FAILED() =&gt; _PyStatus_EXCEPTION()

* Rename 'err' PyStatus variables to 'status'
* Convert RUN_CODE() macro to config_run_code() static inline function
* Remove functions:

  * _Py_InitializeFromArgs()
  * _Py_InitializeFromWideArgs()
  * _PyInterpreterState_GetCoreConfig()</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488)</title>
<updated>2019-05-27T06:57:14+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-27T06:57:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=71c52e3048dd07567f0c690eab4e5d57be66f534'/>
<id>71c52e3048dd07567f0c690eab4e5d57be66f534</id>
<content type='text'>
* sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs.
* Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call()
  and gc delete_garbage().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs.
* Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call()
  and gc delete_garbage().</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36710: Add tstate parameter in ceval.c (GH-13547)</title>
<updated>2019-05-24T15:01:38+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-24T15:01:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=438a12dd9d85f463c0bb7bf1505cd87b98b98170'/>
<id>438a12dd9d85f463c0bb7bf1505cd87b98b98170</id>
<content type='text'>
* Fix a possible reference leak in _PyErr_Print() if exception
  is NULL.
* PyErr_BadInternalCall(): replace PyErr_Format() with _PyErr_SetString().
* Add pycore_pyerrors.h header file.
* New functions:

  * _PyErr_Clear()
  * _PyErr_Fetch()
  * _PyErr_Print()
  * _PyErr_Restore()
  * _PyErr_SetObject()
  * _PyErr_SetString()

* Add 'tstate' parameter to _PyEval_AddPendingCall().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fix a possible reference leak in _PyErr_Print() if exception
  is NULL.
* PyErr_BadInternalCall(): replace PyErr_Format() with _PyErr_SetString().
* Add pycore_pyerrors.h header file.
* New functions:

  * _PyErr_Clear()
  * _PyErr_Fetch()
  * _PyErr_Print()
  * _PyErr_Restore()
  * _PyErr_SetObject()
  * _PyErr_SetString()

* Add 'tstate' parameter to _PyEval_AddPendingCall().</pre>
</div>
</content>
</entry>
</feed>
