Steve Stagg <stest...@gmail.com> added the comment:

This appears to have been fixed in python 3:

rx.py:
import urllib.request
print(urllib.request.urlopen('URL:/etc/passwd').read()[:30])

$> python rx.py 
Traceback (most recent call last):
  File "rx.py", line 2, in <module>
    print(urllib.request.urlopen('URL:/etc/passwd').read()[:30])
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 501, in open
    req = Request(fullurl, data)
  File "/usr/lib/python3.9/urllib/request.py", line 320, in __init__
    self.full_url = url
  File "/usr/lib/python3.9/urllib/request.py", line 346, in full_url
    self._parse()
  File "/usr/lib/python3.9/urllib/request.py", line 375, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: '/etc/passwd'

----------
nosy: +stestagg

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37820>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to