← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1765748] Re: webob-1.8.1 breaks projects

 

Reviewed:  https://review.openstack.org/564883
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=73cc41c9ceb4e38b60ea22402524bae49aa41c32
Submitter: Zuul
Branch:    master

commit 73cc41c9ceb4e38b60ea22402524bae49aa41c32
Author: Brian Rosmaita <rosmaita.fossdev@xxxxxxxxx>
Date:   Fri Apr 27 16:46:14 2018 -0400

    Prepare for WebOb 1.8.1
    
    WebOb 1.8.1 removes a function (deprecated for a long time) that
    Glance uses for negotiating 'Accept-Language' headers.  The removed
    function is replaced by a function that implements the "Lookup"
    scheme defined in RFC 4647.
    
    Glance wraps the webob.Request object and provides a convenience
    method around the old function.  This patch uses the new webob
    function in the convenience method and wraps it in such a way that
    the convenience method preserves its current behavior (at least with
    respect to the Glance tests).  But ... "Lookup" is compliant with RFC
    7231, whereas the old function was not.  This means that given
    sufficiently complex Accept-Language header values (containing
    q-values), the best match under webob 1.8.1 will be different from
    the best match under webob 1.7.x.  Given that the best match will,
    however, be RFC 7231 compliant, this is an acceptable change.
    
    One further complication is that the lookup() function is not
    available in webob 1.7.x.  Thus this patch handles both versions.  I
    suggest that as soon as WebOb===1.8.1 is merged into
    lower_constraints, the code be simplified to handle 1.8.x only, and
    the following release note be submitted with that patch:
    
    Negotiation of the 'Accept-Language' header now follows the "Lookup"
    matching scheme described in `RFC 4647, section 3.4
    <https://tools.ietf.org/html/rfc4647.html#section-3.4>`_.  The
    "Lookup" scheme is one of the algorithms suggested in `RFC 7231,
    section 5.3.5
    <https://tools.ietf.org/html/rfc7231.html#section-5.3.5>`_.  (This is
    due to a change in an underlying library, which previously used a
    matching scheme that did not conform to `RFC 7231
    <https://tools.ietf.org/html/rfc7231.html>`_.)
    
    Change-Id: Ib9735b394a134de9a53d577b4d8b5a9c760b7780
    Closes-bug: #1765748


** Changed in: glance
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1765748

Title:
  webob-1.8.1 breaks projects

Status in Glance:
  Fix Released
Status in OpenStack Identity (keystone):
  Triaged
Status in OpenStack Compute (nova):
  In Progress
Status in OpenStack Global Requirements:
  In Progress

Bug description:
  Stuff like this

  ft2.2: glance.tests.unit.common.test_wsgi.ResourceTest.test_translate_exception_StringException: Traceback (most recent call last):
    File "/home/zuul/src/git.openstack.org/openstack/glance/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1297, in patched
      arg = patching.__enter__()
    File "/home/zuul/src/git.openstack.org/openstack/glance/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1369, in __enter__
      original, local = self.get_original()
    File "/home/zuul/src/git.openstack.org/openstack/glance/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1343, in get_original
      "%s does not have the attribute %r" % (target, name)
  AttributeError: <class 'webob.acceptparse.AcceptLanguage'> does not have the attribute 'best_match'

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1765748/+subscriptions