qiskit/_util.py
def _enable_deprecation_warnings():
    """
    Force the `DeprecationWarning` warnings to be displayed for the qiskit
    module, overriding the system configuration as they are ignored by default
    [1] for end-users.

    TODO: on Python 3.7, this might not be needed due to PEP-0565 [2].

    [1] https://docs.python.org/3/library/warnings.html#default-warning-filters
    [2] https://www.python.org/dev/peps/pep-0565/
    """
    # pylint: disable=invalid-name
    deprecation_filter = ('always', None, DeprecationWarning,
                          re.compile(r'^qiskit\.*', re.UNICODE), 0)

    # Instead of using warnings.simple_filter() directly, the internal
    # _add_filter() function is used for being able to match against the
    # module.
    try:
        warnings._add_filter(*deprecation_filter, append=False)
    except AttributeError:
        # ._add_filter is internal and not available in some Python versions.
        pass

    Force the `DeprecationWarning` warnings to be displayed for the qiskit
    module, overriding the system configuration as they are ignored by default
    [1] for end-users.

    TODO: on Python 3.7, this might not be needed due to PEP-0565 [2].

    [1] https://docs.python.org/3/library/warnings.html#default-warning-filters
    [2] https://www.python.org/dev/peps/pep-0565/
    
Force the `DeprecationWarning` warnings to be displayed for the qiskit
module, overriding the system configuration as they are ignored by default
[1] for end-users.

on Python 3.7, this might not be needed due to PEP-0565 [2].


Force the ` DeprecationWarning ` warnings to be displayed for the qiskit module overriding the system configuration as they are ignored by default [ 1 ] for end - users . on Python 3 . 7 this might not be needed due to PEP - 0565 [ 2 ] .
def _enable_deprecation_warnings():
    deprecation_filter = ('always', None, DeprecationWarning,
                          re.compile(r'^qiskit\.*', re.UNICODE), 0)
    try:
        warnings._add_filter(*deprecation_filter, append=False)
    except AttributeError:
        pass
def _enable_deprecation_warnings ( ) : deprecation_filter = ( 'always' , None , DeprecationWarning , re . compile ( r'^qiskit\.*' , re . UNICODE ) , 0 ) try : warnings . _add_filter ( * deprecation_filter , append = False ) except AttributeError : pass
Force the `DeprecationWarning` warnings to be displayed for the qiskit
module, overriding the system configuration as they are ignored by default
[1] for end-users.
Force the ` DeprecationWarning ` warnings to be displayed for the qiskit module overriding the system configuration as they are ignored by default [ 1 ] for end - users .
"""
    Force the `DeprecationWarning` warnings to be displayed for the qiskit
    module, overriding the system configuration as they are ignored by default
    [1] for end-users.

    TODO: on Python 3.7, this might not be needed due to PEP-0565 [2].

    [1] https://docs.python.org/3/library/warnings.html#default-warning-filters
    [2] https://www.python.org/dev/peps/pep-0565/
    """ # pylint: disable=invalid-name # Instead of using warnings.simple_filter() directly, the internal # _add_filter() function is used for being able to match against the # module. # ._add_filter is internal and not available in some Python versions.