summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2019-01-31 20:54:33 -0500
committerGitHub <noreply@github.com>2019-01-31 20:54:33 -0500
commitf379036fbc8872899fe130eea9168b1f17698012 (patch)
tree6a4dac47ef64fcedc61e4ba536464c86b0b4cdf5
parent8f82e5077e2d3aab14aa3da636f79d37ff6d7ed7 (diff)
parentd3afa2f5c5521412188bd7698526378353455820 (diff)
downloadpython-setuptools-git-f379036fbc8872899fe130eea9168b1f17698012.tar.gz
Merge pull request #1665 from pypa/bugfix/1663-restore-port
Ensure port is included in package-index
-rw-r--r--changelog.d/1665.change.rst1
-rw-r--r--setuptools/package_index.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/1665.change.rst b/changelog.d/1665.change.rst
new file mode 100644
index 00000000..55a1c0f1
--- /dev/null
+++ b/changelog.d/1665.change.rst
@@ -0,0 +1 @@
+Restore port in URL handling in package_index.
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 7e9517ce..ea76c005 100644
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -1072,7 +1072,7 @@ def open_with_auth(url, opener=urllib.request.urlopen):
if auth:
auth = "Basic " + _encode_auth(auth)
- parts = scheme, parsed.hostname, path, params, query, frag
+ parts = scheme, netloc, path, params, query, frag
new_url = urllib.parse.urlunparse(parts)
request = urllib.request.Request(new_url)
request.add_header("Authorization", auth)