Ticket #9958: trac_9958-reenable-sage-deprecationwarnings.patch

File trac_9958-reenable-sage-deprecationwarnings.patch, 635 bytes (added by fbissey, 10 years ago)

small patch to sage-doctest in sage_script to reenable sage's deprecation warnings. Idea by my friend Steve Trogdon.

  • sage-doctest

    # HG changeset patch
    # User Francois Bissey <francois.bissey@canterbury.ac.nz>
    # Date 1302826312 -43200
    # Node ID d079a6f7695acca772c1105db650f72570e7441b
    # Parent  18a7bf1dc8087322d879a445a0d39b71fef8831a
    #9958 Change to enable deprecation warnings to work with python 2.7 without getting all the chatter from setting
    PYTHONWARNINGS=default
    
    diff --git a/sage-doctest b/sage-doctest
    a b  
    422422    s += """
    423423def warning_function(f):
    424424    import warnings
     425    warnings.resetwarnings()
    425426
    426427    def doctest_showwarning(message, category, filename, lineno, file=f, line=None):
    427428        try: