Ticket #10327: trac_10327.patch

File trac_10327.patch, 913 bytes (added by mhansen, 2 years ago)
  • sage/misc/citation.pyx

    # HG changeset patch
    # User Mike Hansen <mhansen@gmail.com>
    # Date 1290715000 28800
    # Node ID e183fb2c375c21a4f8e6da3080d9df6d50144f42
    # Parent  0b14d3687a094e0f76837890aabdb66c61667594
    #10327: Problems with get_systems and symbolic expressions
    
    diff --git a/sage/misc/citation.pyx b/sage/misc/citation.pyx
    a b  
    6464        sage: get_systems('I.primary_decomposition()') 
    6565        ['Singular'] 
    6666 
     67        sage: a = var('a') 
     68        sage: get_systems('((a+1)^2).expand()') 
     69        ['ginac', 'GMP'] 
    6770    """ 
    6871    import cProfile, pstats, re 
    6972 
     
    7477 
    7578    #Run the command and get the stats 
    7679    filename = tmp_filename() 
    77     cProfile.runctx(cmd, globals(), locals(), filename) 
     80    cProfile.runctx(cmd, globals(), {}, filename) 
    7881    stats = pstats.Stats(filename) 
    7982 
    8083    #Strings is a list of method names and modules which get run