openSUSE / py2pack

Generate distribution packages from PyPI
Apache License 2.0
69 stars 40 forks source link

Fix proxy #83

Closed SX91 closed 4 years ago

SX91 commented 7 years ago

I have a proxy server with non-default port which doesn't pass urlopen test (won't answer).

In this PR I fixed both problems.

SX91 commented 7 years ago

For some unknown reason xmlrpclib fails on my CentOS 7 VM (using --proxy) with xmlrpclib.ProtocolError: <ProtocolError for pypi.python.org/pypi: 500 Domain Not Found>. That's strange, because it works totally fine on Fedora 25 (python 2.7).

SX91 commented 7 years ago

Found out why. Older httplib versions are buggy: HTTPConnection use self.host instead of self._tunnel_host for Host header, which is definitely incorrect. Now it should work for older python versions.

SX91 commented 7 years ago

Now proxy fixes work in 2.7 and 3.5-3.6.

Sorry, I've mixed my new subcommand commits and proxy fixes.. I need this to generate spec files for local-only packages.

aplanas commented 7 years ago

Do you mind to create two PR? One to address to Proxy problem and other for the other fixing?

toabctl commented 4 years ago

Has open questions and conflicts and is 3 years old. Please reopen if you are still interested.