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

Bug #1798224 reported by Takashi Natsume
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Gorka Eguileor
OpenStack Compute (nova)
Fix Released
Undecided
Takashi Natsume

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''

Tags: testing
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/611204

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/611204
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b9bc20ed3958fba5b49015b43e314a41e904fc1b
Submitter: Zuul
Branch: master

commit b9bc20ed3958fba5b49015b43e314a41e904fc1b
Author: Takashi NATSUME <email address hidden>
Date: Tue Oct 16 14:14:56 2018 +0900

    Fix best_match() deprecation warning

    wsgi call to best_match() 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.

    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

    Simlar changes in the wsgi best language code as well,
    except new call is to lookup().

    Change-Id: Ib93ffffd3f28aa6d53a0a4eed5aeee94900cb073
    Closes-Bug: #1798224

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.0.0rc1

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/791236

Changed in cinder:
status: New → In Progress
Revision history for this message
Gorka Eguileor (gorka) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/791236

Changed in cinder:
status: New → In Progress

Changed in cinder:
assignee: nobody → Gorka Eguileor (gorka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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 <email address hidden>
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 20.0.0.0rc1

This issue was fixed in the openstack/cinder 20.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.