[New-bugs-announce] [issue43728] Change the exception type and message raised when _curses is not found.
report at bugs.python.org
Sun Apr 4 11:17:03 EDT 2021
New submission from Shreyan Avigyan <shreyan.avigyan at gmail.com>:
When importing the curses module, be it on Windows or Darwin or UNIX-based OS or any other platform, if the _curses module is not found then just a ModuleNotFoundError is raised. But this error is not very informational in case of _curses module. Since the curses module is packaged with the Python interpreter itself at first it may seem, to beginners especially, that the Python interpreter was not installed correctly and then they would go searching for an answer for about 4-5 days.
We know that curses library is not installed on windows by default and may or may not be present on other operating systems. Most UNIX system have ncurses or other curses library installed by default.
Python errors have a reputation of being very informational. I would like to submit a PR to modify the curses module a little bit by declaring a BaseException class and raising that Exception with the message "_curses module not found. Make sure a curses library is installed" or some kind of message like that.
But before I do that I would like to take advice from experienced developers about somethings. Is this change in the exception, raised when _curses module is not found, acceptable by the Python Community? If it is then should a draft PEP be submitted or should a PR be directly submitted to python/cpython?
components: Library (Lib)
title: Change the exception type and message raised when _curses is not found.
versions: Python 3.10
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce