← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1798224] Re: DeprecationWarning: The behavior of .best_match for the Accept classes is currently being maintained for backward compatibility, but the method will be deprecated in the future

 

Reviewed:  https://review.opendev.org/c/openstack/cinder/+/791236
Committed: https://opendev.org/openstack/cinder/commit/3d8d14d762319edde12e8866ee2b7cdea275c3ab
Submitter: "Zuul (22348)"
Branch:    master

commit 3d8d14d762319edde12e8866ee2b7cdea275c3ab
Author: Gorka Eguileor <geguileo@xxxxxxxxxx>
Date:   Thu May 13 13:55:56 2021 +0200

    Fix best_match() deprecation warning
    
    Our WSGI calls best_match() and generates the following warning:
    
      DeprecationWarning: The behavior of .best_match for the Accept classes
      is currently being maintained for backward compatibility, but the
      method will be deprecated in the future, as its behavior is not
      specified in (and currently does not conform to) RFC 7231.
    
    We can see these when running the api-ref functional tests.
    
    See the following URL for more information about deprecation.
    
    https://docs.pylonsproject.org/projects/webob/en/stable/api/webob.html#webob.acceptparse.AcceptValidHeader.best_match
    
    Fix them as per Takashi's patch on Nova with change id
    Ib93ffffd3f28aa6d53a0a4eed5aeee94900cb073 (his name has been removed
    from the NOTE because we no longer do that in Cinder).
    
    Closes-Bug: #1798224
    Change-Id: I4084bc9c58146fc7a56131dc60c9893cb24539ee


** Changed in: cinder
       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/1798224

Title:
  DeprecationWarning: The behavior of .best_match for the Accept classes
  is currently being maintained for backward compatibility, but the
  method will be deprecated in the future

Status in Cinder:
  Fix Released
Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  When executing 'tox -e py35', the following deprecation warning is shown.
  It should be fixed.

  2018-10-16 03:36:49.117553 | ubuntu-xenial | {5} nova.tests.unit.api.openstack.compute.test_disk_config.DiskConfigTestCaseV21.test_update_server_override_auto [0.544275s] ... ok
  2018-10-16 03:36:49.117626 | ubuntu-xenial |
  2018-10-16 03:36:49.117666 | ubuntu-xenial | Captured stderr:
  2018-10-16 03:36:49.117703 | ubuntu-xenial | ~~~~~~~~~~~~~~~~
  (snipped...)
  2018-10-16 03:36:49.118228 | ubuntu-xenial |     b'/home/zuul/src/git.openstack.org/openstack/nova/.tox/py35/lib/python3.5/site-packages/webob/acceptparse.py:1379: DeprecationWarning: The behavior of .best_match for the Accept classes is currently being maintained for backward compatibility, but the method will be deprecated in the future, as its behavior is not specified in (and currently does not conform to) RFC 7231.'
  2018-10-16 03:36:49.118288 | ubuntu-xenial |     b'  DeprecationWarning,'
  2018-10-16 03:36:49.118319 | ubuntu-xenial |     b''

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



References