[New-bugs-announce] [issue29821] importing module shutil executes file 'copy.py'

Oliver Etchebarne (drmad) report at bugs.python.org
Wed Mar 15 12:35:14 EDT 2017


New submission from Oliver Etchebarne (drmad):

I didn't research this issue further. Create a file 'test.py', and write only 'import shutil'. Then create a file 'copy.py' in the same directory, and write something inside, like 'print ("OH NO")'.

When you run test.py, 'copy.py' is executed, and prints the string. Tested with python 3.5 and 3.6. Works as expected (test.py doing nothing) in python 2.7

----------
messages: 289681
nosy: Oliver Etchebarne (drmad)
priority: normal
severity: normal
status: open
title: importing module shutil executes file 'copy.py'
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29821>
_______________________________________


More information about the New-bugs-announce mailing list