sabnzbd / sabnzbd

SABnzbd - The automated Usenet download tool
http://sabnzbd.org
Other
2.24k stars 338 forks source link

[dev-mode] urlgrabber: DeprecationWarning #1415

Closed sanderjo closed 4 years ago

sanderjo commented 4 years ago

I think I can solve this one myself.

2020-05-01 07:38:30,155::INFO::[urlgrabber:126] Grabbing URL https://sabnzbd.org/tests/test_download_100MB.nzb
/home/sander/git/sjo-sab-1mei2020/sabnzbd/urlgrabber.py:328: DeprecationWarning: urllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() instead
  urltype, rest = urllib.parse.splittype(url)
/home/sander/git/sjo-sab-1mei2020/sabnzbd/urlgrabber.py:329: DeprecationWarning: urllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() instead
  realhost, rest = urllib.parse.splithost(rest)
/home/sander/git/sjo-sab-1mei2020/sabnzbd/urlgrabber.py:331: DeprecationWarning: urllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() instead
  user_passwd, realhost = urllib.parse.splituser(realhost)
sanderjo commented 4 years ago

Easy reproduction with the usual one-liner format:

$ python3 -X dev -X tracemalloc=5  -c "import sabnzbd.urlgrabber; print(sabnzbd.urlgrabber._build_request('https://sabnzbd.org/tests/test_download_100MB.nzb'))"
/home/sander/git/sabbie-2mei-nogeenkeer/sabnzbd/urlgrabber.py:328: DeprecationWarning: urllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() instead
  urltype, rest = urllib.parse.splittype(url)
/home/sander/git/sabbie-2mei-nogeenkeer/sabnzbd/urlgrabber.py:329: DeprecationWarning: urllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() instead
  realhost, rest = urllib.parse.splithost(rest)
/home/sander/git/sabbie-2mei-nogeenkeer/sabnzbd/urlgrabber.py:331: DeprecationWarning: urllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() instead
  user_passwd, realhost = urllib.parse.splituser(realhost)
<http.client.HTTPResponse object at 0x7fdab4f66190>
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.