Ticket #652 (closed defect: fixed)
[with patch, with positive review] .sage files destroy existing .py files
| Reported by: | jvoight | Owned by: | was |
|---|---|---|---|
| Priority: | blocker | Milestone: | sage-2.10.1 |
| Component: | interfaces | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
If files a.sage and a.py exist in a directory, then
sage: load a.sage
destroys the file a.py and replaces it with an automatically generated file. Either users should be warned of this "feature" or something else should be done.
Attachments
Change History
comment:4 Changed 4 years ago by mabshoff
- Priority changed from minor to blocker
- Milestone changed from sage-2.10 to sage-2.9.2
comment:5 Changed 4 years ago by robertwb
Is there any reason to put the .py files in the same directory? It would probably be less confusing to just put them in temp. If one wants to see them, one can use sage -preparse.
I'm having trouble finding where exactly these files are getting written/used.
comment:6 Changed 4 years ago by ncalexan
- Summary changed from .sage files destroy existing .py files to [with patch, needs review] .sage files destroy existing .py files
Patch preparses .sage files to temporary .py files in a temp directory.
comment:7 Changed 4 years ago by ncalexan
- Summary changed from [with patch, needs review] .sage files destroy existing .py files to [with patch, with negative review] .sage files destroy existing .py files
DO NOT APPLY, THIS HAS TROUBLE WITH DIRECTORIES
comment:8 Changed 4 years ago by ncalexan
- Summary changed from [with patch, with negative review] .sage files destroy existing .py files to [with patch, needs review] .sage files destroy existing .py files
Updated patch should work -- the issue was that 'load /abs/dir/tofile.sage' was borked. Hopefully this works better.
comment:9 Changed 4 years ago by cwitty
- Summary changed from [with patch, needs review] .sage files destroy existing .py files to [with patch, with positive review] .sage files destroy existing .py files
I reproduced the problem with the previous code, and the patch does fix the problem; and the code looks good.
comment:10 Changed 4 years ago by mabshoff
- Status changed from new to closed
- Resolution set to fixed
Merged ncalexan-652-updated.patch in Sage 2.10.1.rc1

