~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/symbol_versioning.py

  • Committer: John Arbash Meinel
  • Date: 2008-05-28 23:13:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3458.
  • Revision ID: john@arbash-meinel.com-20080528231330-k9ger42pvc1eiw1l
remove the parameter from activate, and just have it always False

Show diffs side-by-side

added added

removed removed

Lines of Context:
363
363
    warnings.filterwarnings('ignore', category=DeprecationWarning)
364
364
 
365
365
 
366
 
def activate_deprecation_warnings(always=True):
 
366
def activate_deprecation_warnings():
367
367
    """Call this function to activate deprecation warnings.
368
368
 
369
369
    When running in a 'final' release we suppress deprecation warnings.
373
373
    Note: warnings that have already been issued under 'ignore' will not be
374
374
    reported after this point. The 'warnings' module has already marked them as
375
375
    handled, so they don't get issued again.
376
 
 
377
 
    :param always: If False, check warnings.filter to see if warnings are set
378
 
        to be turned into errors. If True, then do not override with 'default'.
379
376
    """
380
377
    import warnings
381
 
    if not always and _check_for_filter(True):
 
378
    if _check_for_filter(True):
382
379
        # DeprecationWarnings are already turned into errors, don't downgrade
383
380
        # them to 'default'.
384
381
        return