STINNER Victor <vstin...@python.org> added the comment:

> I agree with @p-ganssle, If exist some problem on initialize Python 
> interpreter it would be great if it return a non-zero status and avoid an 
> abort()

Since Python 3.8 (PEP 587), Python no longer call abort() on initialization 
error.

$ echo bug > abc.py

$ PYTHONPATH=$PWD python3.8 -c pass
Fatal Python error: init_sys_streams: can't initialize sys standard streams
Python runtime state: core initialized
Traceback (most recent call last):
  File "/usr/lib64/python3.8/io.py", line 52, in <module>
  File "/home/vstinner/abc.py", line 1, in <module>
NameError: name 'bug' is not defined

I don't think that it's worth it to change Python 3.7.

The initial issue was that abort() was called in this case. It's no longer the 
case, so I close the issue.

If someone cares abou the more general issue with the current directory being 
added to sys.path, please open a separated issue (or look for existing issues).

----------
components: +Interpreter Core
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.9 -Python 3.5, Python 3.6, Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35969>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to