[Python-ideas] [Python-Dev] If you shadow a module in the standard library that IDLE depends on, bad things happen
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Nov 1 18:22:39 EST 2015
Steven D'Aprano wrote:
> (1) Beginning with Python 3.6, the default is that the current directory
> is put at the end of sys.path rather than the beginning. Instead of:
>
> Scripts which deliberately or unintentionally shadow installed packages
> will break from this change. I don't have a problem with this. You can't
> fix harmful behaviour without breaking code that depends on that harmful
> behaviour.
It will also break scripts that rely on looking at the
first element of sys.path to find the directory they
are running from. Such code is NOT relying on harmful
behaviour.
--
Greg
More information about the Python-ideas
mailing list