[issue38631] Replace Py_FatalError() with regular Python exceptions

2021-01-29 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ba7a99ddb52a45c8dec1f7e9f1648add0ace82ab by Victor Stinner in 
branch 'master':
bpo-38631: Replace compiler fatal errors with exceptions (GH-24369)
https://github.com/python/cpython/commit/ba7a99ddb52a45c8dec1f7e9f1648add0ace82ab


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2021-01-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +23193
pull_request: https://github.com/python/cpython/pull/24369

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-03-10 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4e53abb0f4773e1cce68a4f41ddbb43e74364c5f by Victor Stinner in 
branch 'master':
bpo-38631: _PyGILState_Init() returns PyStatus (GH-18908)
https://github.com/python/cpython/commit/4e53abb0f4773e1cce68a4f41ddbb43e74364c5f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-03-10 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18263
pull_request: https://github.com/python/cpython/pull/18908

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2a4903fcce54c25807d362dbbbcfb32d0b494f9f by Victor Stinner in 
branch 'master':
bpo-38631: Add _Py_NO_RETURN to functions calling Py_FatalError() (GH-18278)
https://github.com/python/cpython/commit/2a4903fcce54c25807d362dbbbcfb32d0b494f9f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 17c68b8107e348aeaaa05f7ac5072cacff916022 by Victor Stinner in 
branch 'master':
bpo-38631: Replace Py_FatalError() with assert() in ceval.c (GH-18279)
https://github.com/python/cpython/commit/17c68b8107e348aeaaa05f7ac5072cacff916022


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ec3c99c8a73650d7833189bd973ec492564aa479 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in unicodeobject.c (GH-18281)
https://github.com/python/cpython/commit/ec3c99c8a73650d7833189bd973ec492564aa479


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17656
pull_request: https://github.com/python/cpython/pull/18281

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17654
pull_request: https://github.com/python/cpython/pull/18279

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17653
pull_request: https://github.com/python/cpython/pull/18278

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2bf127d97bd1d60ead7c20d429b0c61ef61fc554 by Victor Stinner in 
branch 'master':
bpo-38631: Replace tp_new_wrapper() fatal error with SystemError (GH-18262)
https://github.com/python/cpython/commit/2bf127d97bd1d60ead7c20d429b0c61ef61fc554


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7a1f6c2da46a04d0ff0acc01542f30bfeaf0e0c7 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in init_slotdefs() (GH-18263)
https://github.com/python/cpython/commit/7a1f6c2da46a04d0ff0acc01542f30bfeaf0e0c7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5eb8bff7e4aa7e4d8580a30323641388c8ff59a5 by Victor Stinner in 
branch 'master':
bpo-38631: Replace Py_FatalError() with _PyObject_ASSERT_FAILED_MSG() (GH-18258)
https://github.com/python/cpython/commit/5eb8bff7e4aa7e4d8580a30323641388c8ff59a5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17640
pull_request: https://github.com/python/cpython/pull/18263

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17639
pull_request: https://github.com/python/cpython/pull/18262

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-29 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17638
pull_request: https://github.com/python/cpython/pull/18258

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

There are still around 122 calls to Py_FatalError() in the master branch. But 
remaining ones are the hardest to remove. I close the issue, it's already 
better than previously.

Compare this number to 285 calls in Python 3.6.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d3a1de22705cc79d7e8a0f44c4f00255e58c8b20 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in _PyCodecRegistry_Init() (GH-18217)
https://github.com/python/cpython/commit/d3a1de22705cc79d7e8a0f44c4f00255e58c8b20


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a27831351873bd7eff10863353d475c29fb0d7bb by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in PyCode_New() (GH-18215)
https://github.com/python/cpython/commit/a27831351873bd7eff10863353d475c29fb0d7bb


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17597
pull_request: https://github.com/python/cpython/pull/18217

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 47ee8a6063c22ec272fe7a2d95d12f7811ebb48b by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in _memory_release() (GH-18214)
https://github.com/python/cpython/commit/47ee8a6063c22ec272fe7a2d95d12f7811ebb48b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a94c6b61aa5c09237b8105e5aee638cd54197b6f by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in PyModule_Create2() (GH-18212)
https://github.com/python/cpython/commit/a94c6b61aa5c09237b8105e5aee638cd54197b6f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17595
pull_request: https://github.com/python/cpython/pull/18215

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17594
pull_request: https://github.com/python/cpython/pull/18214

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17591
pull_request: https://github.com/python/cpython/pull/18212

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-24 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 656c45ec9a9dc2e94cec199ebde553a6979e0e05 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in GC collect() (GH-18164)
https://github.com/python/cpython/commit/656c45ec9a9dc2e94cec199ebde553a6979e0e05


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-24 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17551
pull_request: https://github.com/python/cpython/pull/18164

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 444b39bb64aa894d3f1831210a8ce40042a5a532 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in handle_legacy_finalizers() (GH-17266)
https://github.com/python/cpython/commit/444b39bb64aa894d3f1831210a8ce40042a5a532


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16758
pull_request: https://github.com/python/cpython/pull/17266

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 04394df74b3d0783893da7dafa7803a003516402 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in float.__getformat__() (GH-17232)
https://github.com/python/cpython/commit/04394df74b3d0783893da7dafa7803a003516402


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bc7d3aa6d74b718699b7a6bced9b0dfdfbf95c13 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in _multibytecodec init (GH-17233)
https://github.com/python/cpython/commit/bc7d3aa6d74b718699b7a6bced9b0dfdfbf95c13


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16733
pull_request: https://github.com/python/cpython/pull/17233

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-18 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16732
pull_request: https://github.com/python/cpython/pull/17232

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-01 Thread STINNER Victor


STINNER Victor  added the comment:

(I have a few more functions that I would like to patch, so I keep the issue 
open as place holder.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-11-01 Thread Eric Snow


Eric Snow  added the comment:

FWIW, I agree. :)

--
nosy: +eric.snow

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-10-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1d8da61f5ad26274556e0bbce260ce292d0402a1 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in readline (GH-16998)
https://github.com/python/cpython/commit/1d8da61f5ad26274556e0bbce260ce292d0402a1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-10-30 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +16525
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16998

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38631] Replace Py_FatalError() with regular Python exceptions

2019-10-29 Thread STINNER Victor


New submission from STINNER Victor :

I replaced dozens of Py_FatalError() calls with better error reporting, but 
there are still many places calling Py_FatalError().

The problem of Py_FatalError() is when Python is embedded into an application: 
Python must not kill the whole process.

Well, even in the "regular" Python (/usr/bin/python3), Python should not exit 
immediately on an error.

For example, the readline module calls Py_FatalError() on memory allocation 
failure, whereas PyErr_NoMemory() could be used: PyErr_NoMemory() should work 
since it should not allocate memory.

--
components: Interpreter Core
messages: 355651
nosy: vstinner
priority: normal
severity: normal
status: open
title: Replace Py_FatalError() with regular Python exceptions
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com