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
(cherry picked from commit e8dfc6b037
)
changes/20/845220/2
parent
96ae85ee4d
commit
51ef6ca2cb
Loading…
Reference in New Issue