1. Martin von Löwis
  2. pypissh
  3. Issues
Issue #2 new

TypeError: open() got an unexpected keyword argument 'timeout'

acoobe
created an issue

{{{ Traceback (most recent call last): File "setup.py", line 28, in <module> 'Topic :: Software Development :: Libraries :: Python Modules', File "/usr/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/distutils/command/upload.py", line 60, in run self.upload_file(command, pyversion, filename) File "/usr/lib/python2.7/distutils/command/upload.py", line 176, in upload_file result = urlopen(request) File "/usr/local/lib/python2.7/dist-packages/pypissh.py", line 210, in urlopen return _opener.open(req, data) File "/usr/local/lib/python2.7/dist-packages/pypissh.py", line 66, in open return OpenerDirector.open(self, req, data=data) File "/usr/lib/python2.7/urllib2.py", line 397, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 429, in error result = self._call_chain(args) File "/usr/lib/python2.7/urllib2.py", line 369, in _call_chain result = func(args) File "/usr/lib/python2.7/urllib2.py", line 605, in http_error_302 return self.parent.open(new, timeout=req.timeout) TypeError: open() got an unexpected keyword argument 'timeout' }}}

Comments (1)

  1. Myroslav Opyr

    The attached patch partly resolves the issue. But it fails with AsserionError (output from jarn.mkrelease):

    Registering quintagroup.theme.techlight to https://plone.org/products
    Server response (200): OK
    running upload
    Traceback (most recent call last):
      File "<string>", line 22, in <module>
      File "setup.py", line 49, in <module>
        """,
      File "/data/projects/Python-2.6.6/lib/python2.6/distutils/core.py", line 152, in setup
        dist.run_commands()
      File "/data/projects/Python-2.6.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
        self.run_command(cmd)
      File "/data/projects/Python-2.6.6/lib/python2.6/distutils/dist.py", line 995, in run_command
        cmd_obj.run()
      File "/data/projects/Python-2.6.6/lib/python2.6/distutils/command/upload.py", line 57, in run
        self.upload_file(command, pyversion, filename)
      File "/data/projects/Python-2.6.6/lib/python2.6/site-packages/pypissh-1.3-py2.6.egg/pypissh.py", line 77, in ssh_upload_file
    AssertionError
    upload failed
    

    As far as I understand, the problem is that ssh_upload_file "unconditionally creates HTTPSSHConnection". It can probably react to URL and switch HTTPSSHConnection on only if submit@pypi.python.org is there, as I don't know any other pypi server that support pypissh so far.

  2. Log in to comment