Author nedbat
Recipients nedbat
Date 2017-03-05.13:31:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za>
In-reply-to
Content
3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py
Previous versions, including 3.6.0, did not. Is this intentional?

$ pwd
/Users/ned/foo
$ cat main361/__main__.py
import pprint, sys
pprint.pprint(sys.path)
$ for ver in 2.7.13 3.4.6 3.5.3 3.6.0 3.6.1rc1; do
>     py=/usr/local/pythonz/pythons/CPython-$ver/bin/python
>     $py -V
>     $py main361
> done
Python 2.7.13
['main361',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python27.zip',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/plat-darwin',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/plat-mac',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/plat-mac/lib-scriptpackages',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/lib-tk',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/lib-old',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/lib-dynload',
 '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/site-packages']
Python 3.4.6
['main361',
 '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python34.zip',
 '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4',
 '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4/plat-darwin',
 '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4/lib-dynload',
 '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4/site-packages']
Python 3.5.3
['main361',
 '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python35.zip',
 '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5',
 '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5/plat-darwin',
 '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5/lib-dynload',
 '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5/site-packages']
Python 3.6.0
['main361',
 '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python36.zip',
 '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python3.6',
 '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python3.6/lib-dynload',
 '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python3.6/site-packages']
Python 3.6.1rc1
['main361',
 '/Users/ned/foo',
 '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python36.zip',
 '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python3.6',
 '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python3.6/lib-dynload',
 '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python3.6/site-packages']
$
History
Date User Action Args
2017-03-05 13:31:49nedbatsetrecipients: + nedbat
2017-03-05 13:31:48nedbatsetmessageid: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za>
2017-03-05 13:31:48nedbatlinkissue29723 messages
2017-03-05 13:31:48nedbatcreate