#11821: sage-preparse: give 'safer' names to .py files
--------------------------+-------------------------------------------------
   Reporter:  jhpalmieri  |          Owner:               
       Type:  defect      |         Status:  new          
   Priority:  major       |      Milestone:  sage-4.7.2   
  Component:  scripts     |       Keywords:               
Work_issues:              |       Upstream:  N/A          
   Reviewer:              |         Author:  John Palmieri
     Merged:              |   Dependencies:               
--------------------------+-------------------------------------------------
 If you run "sage new.sage" on a script "new.sage", it creates a preparsed
 file "new.py".  Then when a file in the twisted package tries to import
 the "new" Python module, it ends up importing this preparsed file instead,
 which leads to problems which can be hard to track down.

 I can think of three solutions:

  1. hope that users will know not to use names like "new.sage".  This is
 the current state of affairs, and it seems overly optimistic to me.
  2. give a warning, or fail outright with an error, if the name of the
 file is the same as that of a Python module.
  3. name the preparsed file something which is less likely to cause a
 clash, for example, turn "file.sage" into "file_preparsed.py".

 The attached patch implements number 3.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11821>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to