Opened 19 years ago

Closed 18 years ago

#415 closed defect (invalid)

download_setuptools fails with authenticating proxy

Reported by: skip_spm@… Owned by: Adrian Holovaty
Component: Tools Version:
Severity: minor Keywords: proxy, authenticating, download
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The download_setuptools uses module urllib2 to get the setuptools module. It isn't properly setup to handle an autheticating proxy. I'm not sure how to include/enable this support for your shipping product, but here is the code that I injected into download_setuptools to get it to work through my company's authenticating proxy server (at line 102 insert the following):

username = "myusername"
password = "mypassword"
authinfo = urllib2.HTTPBasicAuthHandler()
authinfo.add_password('', '', username, password)
proxy_support = urllib2.ProxyHandler({"http" : "http://%s:%s@proxy.mycompany.com:8080" % (username, password)})
opener = urllib2.build_opener(proxy_support, authinfo, urllib2.HTTPHandler)

Edit username and password to the appropriate values.

I hope this helps in some small way. I haven't tried django yet (just finished getting the install to work :). I'll try django out soon and hope that it provides the solution that I'm currently searching for.

Good luck,
Brett Hunt

Attachments (1)

attachment.py (5.2 KB ) - added by Adrian Holovaty 19 years ago.
Sanitized version of previous attachment

Download all attachments as: .zip

Change History (3)

comment:1 by skip_spm@…, 19 years ago

Could an admin please sanitize that attachment. It has sensitive information in it and I just attached it without cleaning it up first.

Thanks, Brett Hunt

by Adrian Holovaty, 19 years ago

Attachment: attachment.py added

Sanitized version of previous attachment

comment:2 by Adrian Holovaty, 18 years ago

Resolution: invalid
Status: newclosed

Looks to be a setuptools bug, which they may have fixed by now. (I'm not sure...)

Note: See TracTickets for help on using tickets.
Back to Top