Enable only deprecation warning for fnmatch deprecation

Bug #1934098 reported by yatin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.utils
Fix Released
Undecided
yatin

Bug Description

[1] enabled all types of warnings, as deprecation is added only DeprecationWarning should be enabled, without it it makes all sorts of warning visible, example:-
# openstack flavor list
/usr/lib/python3.9/site-packages/oslo_utils/fnmatch.py:25: DeprecationWarning: Using the oslo.utils's 'fnmatch' module is deprecated, please use the stdlib 'fnmatch' module.
  debtcollector.deprecate(
/usr/lib/python3.9/site-packages/yaql/language/utils.py:54: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  SequenceType = collections.Sequence
/usr/lib/python3.9/site-packages/yaql/language/utils.py:55: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  MutableSequenceType = collections.MutableSequence
/usr/lib/python3.9/site-packages/yaql/language/utils.py:56: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  SetType = collections.Set
/usr/lib/python3.9/site-packages/yaql/language/utils.py:57: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  MutableSetType = collections.MutableSet
/usr/lib/python3.9/site-packages/yaql/language/utils.py:58: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  MappingType = collections.Mapping
/usr/lib/python3.9/site-packages/yaql/language/utils.py:60: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  IterableType = collections.Iterable
/usr/lib/python3.9/site-packages/yaql/language/utils.py:61: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  IteratorType = collections.Iterator
/usr/lib/python3.9/site-packages/barbicanclient/__init__.py:57: UserWarning: The secrets module is moved to barbicanclient/v1 directory, direct import of barbicanclient.secrets will be deprecated. Please import barbicanclient.v1.secrets instead.
  warnings.warn("The %s module is moved to barbicanclient/v1 "
/usr/lib/python3.9/site-packages/barbicanclient/__init__.py:57: UserWarning: The secrets module is moved to barbicanclient/v1 directory, direct import of barbicanclient.secrets will be deprecated. Please import barbicanclient.v1.secrets instead.
  warnings.warn("The %s module is moved to barbicanclient/v1 "

sys:1: ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('::1', 35016, 0, 0), raddr=('::1', 8774, 0, 0)>
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Should be fixed to enable only Deprecation warning so unnecessary warning's get's suppressed.

Related Story:- https://storyboard.openstack.org/#!/story/2009015

[1] https://review.opendev.org/c/openstack/oslo.utils/+/790429

yatin (yatinkarel)
Changed in oslo.utils:
assignee: nobody → yatin (yatinkarel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.utils (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/oslo.utils/+/798804

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

Reviewed: https://review.opendev.org/c/openstack/oslo.utils/+/798804
Committed: https://opendev.org/openstack/oslo.utils/commit/4dc538d1c024b94ab629c1ea478fd547f16e85bd
Submitter: "Zuul (22348)"
Branch: master

commit 4dc538d1c024b94ab629c1ea478fd547f16e85bd
Author: yatinkarel <email address hidden>
Date: Wed Jun 30 14:03:37 2021 +0530

    Drop warnings enable filter

    [1] Enabled warnings without specifying category,
    leading to all sort of warnings enabled, this patch
    drops it and let it to consumers to enable warnings
    types which they are interested in.

    [1] https://review.opendev.org/c/openstack/oslo.utils/+/790429

    Closes-Bug: #1934098
    Change-Id: I822138c18e0932e8f7e3dc62267f167876c962ae

Changed in oslo.utils:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.utils 4.9.2

This issue was fixed in the openstack/oslo.utils 4.9.2 release.

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.