Python import shadowing different between 3.4.6 and 3.5.2

Viewed 515

Python import shadowing seems to be different between version 3.4.6 and 3.5.2 :

$ cat time.py
from time import time
$ pyenv global 3.4.6
$ python -V
Python 3.4.6
$ python time.py 
Traceback (most recent call last):
  File "time.py", line 1, in <module>
    from time import time
  File "/home/vagrant/tmp/time.py", line 1, in <module>
    from time import time
ImportError: cannot import name 'time'
$ pyenv global 3.5.2 
$ python -V
Python 3.5.2
$ python time.py
$ echo no error
no error

Question 1: Why is... those things ?

Question 2: Is it there something in a changelog about that ? I can't find anything...

1 Answers
Related