yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #73329
[Bug 1773225] Re: placement needs to stop using accept.best_match from webob it is deprecated
Reviewed: https://review.openstack.org/575127
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=450444a7829506f5539bf25ecf6cee1c5d82c48d
Submitter: Zuul
Branch: master
commit 450444a7829506f5539bf25ecf6cee1c5d82c48d
Author: Chris Dent <cdent@xxxxxxxxxxxxx>
Date: Wed Jun 13 15:16:35 2018 +0100
[placement] replace deprecated accept.best_match
Webob has deprecated the best_match[1] method on accept headers and now
spews warnings when it sees it.
This change fixes it by using the equivalent (but more correct with
regard to the relevant RFCs[2]) acceptable_offers[3] method.
Existing unit tests in placement/test_util.py cover this change.
[1] https://docs.pylonsproject.org/projects/webob/en/stable/api/webob.html#webob.acceptparse.AcceptValidHeader.best_match
[2] https://tools.ietf.org/html/rfc7231#section-5.3.2
[3] https://docs.pylonsproject.org/projects/webob/en/stable/api/webob.html#webob.acceptparse.AcceptValidHeader.acceptable_offers
Change-Id: Ie4d81fa178b3ed6b2a7b450b4978009486f07810
Closes-Bug: #1773225
** Changed in: nova
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/1773225
Title:
placement needs to stop using accept.best_match from webob it is
deprecated
Status in OpenStack Compute (nova):
Fix Released
Bug description:
Modern webob has improved its management of accept headers to be more
in alignment with the HTTP RFCs (see bug
https://bugs.launchpad.net/nova/+bug/1765748 ), deprecating their old
handling:
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.
Eventually placement (in
nova.api.openstack.placement.util:check_accept) should be updated to
use the new way.
Creating a separate bug to be task oriented.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1773225/+subscriptions
References