Commit 55b00498 authored by Manuel Barkhau's avatar Manuel Barkhau

pyp3 compat fixes

parent 3d622837
...@@ -453,7 +453,7 @@ class WSGIHandler(object): ...@@ -453,7 +453,7 @@ class WSGIHandler(object):
finally: finally:
# Avoid dangling circular ref # Avoid dangling circular ref
exc_info = None exc_info = None
self.code = int(status.split(' ', 1)[0]) self.code = int(status.split(b' ', 1)[0])
self.status = status self.status = status
self.response_headers = headers self.response_headers = headers
......
...@@ -41,7 +41,7 @@ if PYPY: ...@@ -41,7 +41,7 @@ if PYPY:
# otherwise we get a new DummyThread, which cannot be joined. # otherwise we get a new DummyThread, which cannot be joined.
# Fixes tests in test_threading_2 # Fixes tests in test_threading_2
if _get_ident() not in __threading__._active and len(__threading__._active) == 1: if _get_ident() not in __threading__._active and len(__threading__._active) == 1:
k, v = __threading__._active.items()[0] k, v = next(iter(__threading__._active.items()))
del __threading__._active[k] del __threading__._active[k]
__threading__._active[_get_ident()] = v __threading__._active[_get_ident()] = v
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment