[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2019-06-02 Thread STINNER Victor
STINNER Victor added the comment: The issue has been fixed in Python 3.8. See PEP 587 and http://docs.python.org/dev/c-api/init_config.html for the larger scope. For Python 3.7, the fix is trivial: don't add the following 2 lines in your application: if not hasattr(sys, 'argv'): sys.arg

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2019-05-24 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13464 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2019-05-13 Thread STINNER Victor
STINNER Victor added the comment: See also the PEP 587. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2019-05-13 Thread STINNER Victor
STINNER Victor added the comment: In Python 3.8, sys.argv is now always created. It's initialized to sys.argv = [""] if (argc, argv) are not set in _PyCoreConfig. So PR 12463 looks useless to me, except if someone wants to change the behavior. --

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2019-05-10 Thread Dieter Weber
Change by Dieter Weber : -- keywords: +patch pull_requests: +13153 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2018-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: For detecting 'embedded', it is enough that only one documented attribute value be unique to embedded situations. -- ___ Python tracker ___ _

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2018-01-19 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2018-01-19 Thread Pedro
Pedro added the comment: I agree that an empty list, instead of a list with an empty string, makes more sense. Leaving _xoptions as {} would be the same as when it runs non-embedded without any -X arguments, but I guess there's no way of making {} any more empty. --

[issue32573] All sys attributes (.argv, ...) should exist in embedded environments

2018-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Pedro: David and Nick are proposing initializing sys.argv to [] rather than [''] for embedded interpreters. This would say 'running embedded'. The .argv entry would need an additional sentence. I like Nick's proposal, except that _xoptions should be {}. Do