#16955: Give safer names to preparsed files
---------------------------+----------------------------
   Reporter:  jdemeyer     |            Owner:
       Type:  enhancement  |           Status:  new
   Priority:  major        |        Milestone:  sage-6.4
  Component:  scripts      |         Keywords:
  Merged in:               |          Authors:
  Reviewers:               |  Report Upstream:  N/A
Work issues:               |           Branch:
     Commit:               |     Dependencies:
   Stopgaps:               |
---------------------------+----------------------------
 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 several 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.sage.py`.
  4. don't save the preparsed file at all: use a pipe to transfer the
 preparsed file to Python (see #11821).

 The goal of this ticket is to implement 3.

--
Ticket URL: <http://trac.sagemath.org/ticket/16955>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to