@contextmanager
def suppressed_deprecations():
    prev_enabled = _local.enabled
    _local.enabled = False
    try:
        yield
    finally:
        _local.enabled = prev_enabled
See lfs.plugins.PriceCalculator
dataset/ETHPy150Open getlogbook/logbook/logbook/utils.py/suppressed_deprecations--crossover with--dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/models.py/Product.get_tax_rate