Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

Thanks Victor for the details. Can this be classified as an easy issue? I guess 
the fix will be as below : 

1. Add an entry for '-I' at 
https://github.com/python/cpython/blob/4b430e5f6954ef4b248e95bfb4087635dcdefc6d/Lib/subprocess.py#L260

2. Add a test for '-I' at 
https://github.com/python/cpython/blob/4b430e5f6954ef4b248e95bfb4087635dcdefc6d/Lib/test/test_support.py#L472.
 
The only thing here is that '-I' returns '-s -E -I' unlike other options where 
args can be used for comparison logic in check_options. check_options should be 
changed so that this can take given args and the expected args for comparison 
to accommodate -I. Maybe there is a better way?

Off topic : I don't know why '-I' is not documented as sys.flags.isolated at 
https://docs.python.org/3.7/library/sys.html#sys.flags . Maybe I will open up a 
separate issue for this?

----------

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

Reply via email to