python3 compatibility: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'

Bug #1877104 reported by Florian Wolff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
paste (Ubuntu)
New
Undecided
Unassigned

Bug Description

Issue exists on xenial in python3-paste 1.7.5.1-6ubuntu3 which throws exception:

   File "/usr/lib/python3/dist-packages/paste/httpserver.py", line 1068, in process_request_in_thread
     self.finish_request(request, client_address)
   File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
     self.RequestHandlerClass(request, client_address, self)
   File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
     self.handle()
   File "/usr/lib/python3/dist-packages/paste/httpserver.py", line 442, in handle
     BaseHTTPRequestHandler.handle(self)
   File "/usr/lib/python3.5/http/server.py", line 422, in handle
     self.handle_one_request()
   File "/usr/lib/python3/dist-packages/paste/httpserver.py", line 437, in handle_one_request
     self.wsgi_execute()
   File "/usr/lib/python3/dist-packages/paste/httpserver.py", line 283, in wsgi_execute
     self.wsgi_setup(environ)
   File "/usr/lib/python3/dist-packages/paste/httpserver.py", line 255, in wsgi_setup
     self.wsgi_environ[key] = ','.join(self.headers.getheaders(k))
 AttributeError: 'HTTPMessage' object has no attribute 'getheaders'
 Exception in thread worker 5:
 Traceback (most recent call last):
   File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
     self.run()
   File "/usr/lib/python3.5/threading.py", line 862, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib/python3/dist-packages/paste/httpserver.py", line 895, in worker_thread_callback
     sys.exc_clear()
 AttributeError: module 'sys' has no attribute 'exc_clear'

due to changes in python3 (3.5.2-2ubuntu0~16.04.10):
- exc_clear() call is no longer required (ref https://docs.python.org/3/whatsnew/3.0.html#index-22 )
- getheaders was renamed to get (ref https://bugs.launchpad.net/python-keystoneclient/+bug/1267987 )

Revision history for this message
Florian Wolff (workflow) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.