Ammar Askar added the comment: As per discussion with haypo on irc, this is not a bug since essentially you've made a file which shadows the following stdlib module https://docs.python.org/3/library/copy.html
When shutil goes to import the copy module, your copy module is given higher priority in the import machinery which is why your code gets executed. You can read up more about this here: http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29821> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com