Message342733
In issue27485 the deprecated functions were replaced with underscore prefixed ones due to which imports where modified. Some of the places where not changed causing NameError in using urllib.request.URLopener.retrieve for local files and non-local files which is deprecated. I found these undefined names while running flake8 on Lib folder. I will raise a PR with tests for the same.
Sample Error :
./python.exe
Python 3.8.0a4+ (heads/master:870b035bc6, May 17 2019, 16:28:23)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from urllib.request import URLopener
>>> URLopener().retrieve('file:///tmp/a.txt')
sys:1: DeprecationWarning: URLopener style of invoking requests is deprecated. Use newer urlopen functions/methods
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/urllib/request.py", line 1786, in retrieve
return url2pathname(splithost(url1)[1]), hdrs
NameError: name 'splithost' is not defined |
|
Date |
User |
Action |
Args |
2019-05-17 16:09:52 | xtreak | set | recipients:
+ xtreak, cheryl.sabella |
2019-05-17 16:09:52 | xtreak | set | messageid: <1558109392.44.0.978961343501.issue36948@roundup.psfhosted.org> |
2019-05-17 16:09:52 | xtreak | link | issue36948 messages |
2019-05-17 16:09:52 | xtreak | create | |
|