<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/errors.c, branch travis-macOS</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-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://git.baserock.org/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://git.baserock.org/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://git.baserock.org/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://git.baserock.org/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://git.baserock.org/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://git.baserock.org/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://git.baserock.org/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>
<entry>
<title>bpo-36710: Add tstate parameter in errors.c (GH-13540)</title>
<updated>2019-05-24T11:44:24+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-24T11:44:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=b4bdecd0fc9112b60a81fec171bc78bc13f2f59c'/>
<id>b4bdecd0fc9112b60a81fec171bc78bc13f2f59c</id>
<content type='text'>
Add 'PyThreadState *tstate' parameter to errors.c functions to avoid
relying on global variables (indirectly on _PyRuntime).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add 'PyThreadState *tstate' parameter to errors.c functions to avoid
relying on global variables (indirectly on _PyRuntime).</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36829: PyErr_WriteUnraisable() normalizes exception (GH-13507)</title>
<updated>2019-05-22T23:00:58+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-22T23:00:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=df22c03b93ea4620fdf4a0b3cbbbfa7c645af783'/>
<id>df22c03b93ea4620fdf4a0b3cbbbfa7c645af783</id>
<content type='text'>
PyErr_WriteUnraisable() now creates a traceback object if there is no
current traceback. Moreover, call PyErr_NormalizeException() and
PyException_SetTraceback() to normalize the exception value. Ignore
silently any error.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PyErr_WriteUnraisable() now creates a traceback object if there is no
current traceback. Moreover, call PyErr_NormalizeException() and
PyException_SetTraceback() to normalize the exception value. Ignore
silently any error.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36829: Add sys.unraisablehook() (GH-13187)</title>
<updated>2019-05-22T09:28:22+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2019-05-22T09:28:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ef9d9b63129a2f243591db70e9a2dd53fab95d86'/>
<id>ef9d9b63129a2f243591db70e9a2dd53fab95d86</id>
<content type='text'>
Add new sys.unraisablehook() function which can be overridden to
control how "unraisable exceptions" are handled. It is called when an
exception has occurred but there is no way for Python to handle it.
For example, when a destructor raises an exception or during garbage
collection (gc.collect()).

Changes:

* Add an internal UnraisableHookArgs type used to pass arguments to
  sys.unraisablehook.
* Add _PyErr_WriteUnraisableDefaultHook().
* The default hook now ignores exception on writing the traceback.
* test_sys now uses unittest.main() to automatically discover tests:
  remove test_main().
* Add _PyErr_Init().
* Fix PyErr_WriteUnraisable(): hold a strong reference to sys.stderr
  while using it</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new sys.unraisablehook() function which can be overridden to
control how "unraisable exceptions" are handled. It is called when an
exception has occurred but there is no way for Python to handle it.
For example, when a destructor raises an exception or during garbage
collection (gc.collect()).

Changes:

* Add an internal UnraisableHookArgs type used to pass arguments to
  sys.unraisablehook.
* Add _PyErr_WriteUnraisableDefaultHook().
* The default hook now ignores exception on writing the traceback.
* test_sys now uses unittest.main() to automatically discover tests:
  remove test_main().
* Add _PyErr_Init().
* Fix PyErr_WriteUnraisable(): hold a strong reference to sys.stderr
  while using it</pre>
</div>
</content>
</entry>
</feed>
