This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author altendky
Recipients altendky
Date 2018-02-15.16:39:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Normally sys.argv is a list but when using the trace module sys.argv gets changed to a tuple.  In my case this caused an issue with running an entry point due to the line:

  sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])

When researching I found:

They point out where trace assigns a tuple to sys.argv.

I'll see what I can do to put together a quick patch.

$ cat
import sys


$ /home/altendky/.pyenv/versions/3.7.0a2/bin/python
3.7.0a2 (default, Feb 15 2018, 11:20:36) 
[GCC 6.3.0 20170516]
<class 'list'>
$ /home/altendky/.pyenv/versions/3.7.0a2/bin/python -m trace --trace
 --- modulename: t, funcname: <module> import sys print(sys.version)
3.7.0a2 (default, Feb 15 2018, 11:20:36) 
[GCC 6.3.0 20170516] print(type(sys.argv))
<class 'tuple'>
 --- modulename: trace, funcname: _unsettrace     sys.settrace(None)
Date User Action Args
2018-02-15 16:39:05altendkysetrecipients: + altendky
2018-02-15 16:39:05altendkysetmessageid: <>
2018-02-15 16:39:05altendkylinkissue32852 messages
2018-02-15 16:39:05altendkycreate