summaryrefslogtreecommitdiff
path: root/Lib/distutils/command/upload.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2008-06-18 20:49:58 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2008-06-18 20:49:58 +0000
commit1afc1696167547a5fa101c53e5a3ab4717f8852c (patch)
treee989e72e71530d892214562785df7e11f84c1111 /Lib/distutils/command/upload.py
parenta656d2cd8984f1ecb5a7e2cd09a18f72452f2b78 (diff)
downloadcpython-git-1afc1696167547a5fa101c53e5a3ab4717f8852c.tar.gz
Make a new urllib package .
It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new package has five submodules: urllib.parse, urllib.request, urllib.response, urllib.error, and urllib.robotparser. The urllib.request.urlopen() function uses the url opener from urllib2. Note that the unittests have not been renamed for the beta, but they will be renamed in the future. Joint work with Senthil Kumaran.
Diffstat (limited to 'Lib/distutils/command/upload.py')
-rw-r--r--Lib/distutils/command/upload.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 2cad2c7bd5..5049f03e93 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -13,7 +13,7 @@ import platform
import configparser
import http.client
import base64
-import urlparse
+import urllib.parse
class upload(PyPIRCCommand):
@@ -145,10 +145,11 @@ class upload(PyPIRCCommand):
self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO)
# build the Request
- # We can't use urllib2 since we need to send the Basic
+ # We can't use urllib since we need to send the Basic
# auth right with the first request
+ # TODO(jhylton): Can we fix urllib?
schema, netloc, url, params, query, fragments = \
- urlparse.urlparse(self.repository)
+ urllib.parse.urlparse(self.repository)
assert not params and not query and not fragments
if schema == 'http':
http = http.client.HTTPConnection(netloc)