From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B2EF2138334 for ; Sat, 19 Oct 2019 06:03:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D560BE08EB; Sat, 19 Oct 2019 06:03:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BFF51E08EB for ; Sat, 19 Oct 2019 06:03:41 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C0AAE34C03C for ; Sat, 19 Oct 2019 06:03:40 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C2361802 for ; Sat, 19 Oct 2019 06:03:38 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1571464747.c366e1a755ed4d6b49883b8d8b20629fe32b6b43.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/util/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/util/_urlopen.py X-VCS-Directories: lib/portage/util/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c366e1a755ed4d6b49883b8d8b20629fe32b6b43 X-VCS-Branch: master Date: Sat, 19 Oct 2019 06:03:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 087445b9-68bf-415c-9fdb-4d4c47fbe38a X-Archives-Hash: b7a33981c1cf4577e3c4ef4260f06029 commit: c366e1a755ed4d6b49883b8d8b20629fe32b6b43 Author: Zac Medico gentoo org> AuthorDate: Sat Oct 19 05:46:53 2019 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Oct 19 05:59:07 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c366e1a7 urlopen: eliminate deprecated urllib.parse.splituser Signed-off-by: Zac Medico gentoo.org> lib/portage/util/_urlopen.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/portage/util/_urlopen.py b/lib/portage/util/_urlopen.py index fc9db74a0..1d8ba3fd3 100644 --- a/lib/portage/util/_urlopen.py +++ b/lib/portage/util/_urlopen.py @@ -1,4 +1,4 @@ -# Copyright 2012-2014 Gentoo Foundation +# Copyright 2012-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 import io @@ -11,12 +11,10 @@ try: from urllib.request import urlopen as _urlopen import urllib.parse as urllib_parse import urllib.request as urllib_request - from urllib.parse import splituser as urllib_parse_splituser except ImportError: from urllib import urlopen as _urlopen import urlparse as urllib_parse import urllib2 as urllib_request - from urllib import splituser as urllib_parse_splituser if sys.hexversion >= 0x3000000: # pylint: disable=W0622 @@ -43,7 +41,7 @@ def urlopen(url, if_modified_since=None): if parse_result.scheme not in ("http", "https"): return _urlopen(url) else: - netloc = urllib_parse_splituser(parse_result.netloc)[1] + netloc = parse_result.netloc.rpartition('@')[-1] url = urllib_parse.urlunparse((parse_result.scheme, netloc, parse_result.path, parse_result.params, parse_result.query, parse_result.fragment)) password_manager = urllib_request.HTTPPasswordMgrWithDefaultRealm() request = urllib_request.Request(url)