Comment 2 for bug 1976220

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/843721
Committed: https://opendev.org/openstack/tacker/commit/e8dfc6b0372ba86020115395427fc010cfc89352
Submitter: "Zuul (22348)"
Branch: master

commit e8dfc6b0372ba86020115395427fc010cfc89352
Author: Hiromu Asahina <email address hidden>
Date: Sat May 28 13:15:24 2022 +0000

    Fix usage of deprecated .best_match()

    The webob emits a warning for best_match method for the reason that its
    algorithm does not conform to RFC 7231 [1]. This patch replace
    `best_match` with `acceptable_offers` as v2 API does [2].

    The following deprecation warnings are gone with the patch:

    - cceptparse.py:1047: DeprecationWarning: The behavior of
      AcceptValidHeader.best_match is currently being maintained for
      backward compatibility, but it will be deprecated in the future, as it
      does not conform to the RFC.

    [1]
    https://docs.pylonsproject.org/projects/webob/en/stable/api/webob.html#webob.acceptparse.AcceptValidHeader.best_match
    [2]
    https://github.com/openstack/tacker/blob/master/tacker/sol_refactored/api/wsgi.py#L37

    Change-Id: Ia68fa8acb7a27c17f9da7eea587112da4dedb892
    Closes-Bug: #1976220