Reviewed: https://review.openstack.org/339214 Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=88de82e130e25aeff2cf2c0e98159ebce3199d28 Submitter: Jenkins Branch: master
commit 88de82e130e25aeff2cf2c0e98159ebce3199d28 Author: Eric Brown <[email protected]> Date: Thu Jul 7 13:00:43 2016 -0700 Ensure status code is always passed as int There is some inconsistency in calls to the wsgi render_response function. Sometimes the status tuple uses an int for the http status code and other times a string. The Python 3.5 gate job discovered the problem. This patch normalizes all calls to use an int. Change-Id: I136b01f755ff99dfba244e79068fdaae614b2091 Closes-Bug: #1599983 ** Changed in: keystone Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Identity (keystone). https://bugs.launchpad.net/bugs/1599983 Title: Python 3.5 gate exposes issue in webob.response status code type Status in OpenStack Identity (keystone): Fix Released Bug description: Unit test keystone.tests.unit.test_wsgi.ApplicationTest.test_render_response_custom_status fails with the following error: ft274.18: keystone.tests.unit.test_wsgi.ApplicationTest.test_render_response_custom_status_StringException: pythonlogging:'': {{{ Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend. Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend. Adding cache-proxy 'oslo_cache.testing.CacheIsolatingProxy' to backend. }}} Traceback (most recent call last): File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/webob/response.py", line 271, in _status__set status_code = int(value.split()[0]) ValueError: invalid literal for int() with base 10: 'HTTPStatus.NOT_IMPLEMENTED' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/jenkins/workspace/gate-keystone-python35-db-nv/keystone/tests/unit/test_wsgi.py", line 110, in test_render_response_custom_status status=(http_client.NOT_IMPLEMENTED, 'Not Implemented')) File "/home/jenkins/workspace/gate-keystone-python35-db-nv/keystone/common/wsgi.py", line 770, in render_response headerlist=headers) File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/webob/response.py", line 107, in __init__ self.status = status File "/home/jenkins/workspace/gate-keystone-python35-db-nv/.tox/py35/lib/python3.5/site-packages/webob/response.py", line 273, in _status__set raise ValueError('Invalid status code, integer required.') ValueError: Invalid status code, integer required. In some places we pass the status code as a str and others as an int http://logs.openstack.org/42/339142/2/check/gate-keystone-python35-db-nv/847ed7d/testr_results.html.gz To manage notifications about this bug go to: https://bugs.launchpad.net/keystone/+bug/1599983/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

