Sage: Ticket #11887: cython.py: don't create .html and .c files when running compile_and_load
https://trac.sagemath.org/ticket/11887
<p>
This ticket should fix for the problem discussed at <a class="ext-link" href="http://trac.sagemath.org/sage_trac/ticket/11680#comment:23"><span class="icon"></span>at #11680</a>: the patch there causes some .c and .html files to be created when doctesting.
</p>
en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/11887
Trac 1.2John PalmieriSat, 01 Oct 2011 19:45:23 GMTattachment set
https://trac.sagemath.org/ticket/11887
https://trac.sagemath.org/ticket/11887
<ul>
<li><strong>attachment</strong>
set to <em>trac_11887-cython.patch</em>
</li>
</ul>
TicketLeif LeonhardySat, 01 Oct 2011 19:46:12 GMT
https://trac.sagemath.org/ticket/11887#comment:1
https://trac.sagemath.org/ticket/11887#comment:1
<p>
I was just about to open such a ticket... (with priority "trivial" though) :)
</p>
<p>
If my patch is sufficient for you, you could review it... :P
</p>
TicketJohn PalmieriSat, 01 Oct 2011 19:46:57 GMT
https://trac.sagemath.org/ticket/11887#comment:2
https://trac.sagemath.org/ticket/11887#comment:2
<p>
Leif: I've listed both of us as authors for the patch. I took your patch from <a class="closed ticket" href="https://trac.sagemath.org/ticket/11680" title="#11680: enhancement: support extra_compile_args (e.g., C99) when loading/attaching .pyx ... (closed: fixed)">#11680</a> and added a little bit. There is a lot more to be done here (see for example the "TODO" in the patch), but I don't want to work on it right now.
</p>
TicketJohn PalmieriSat, 01 Oct 2011 19:47:27 GMTstatus changed
https://trac.sagemath.org/ticket/11887#comment:3
https://trac.sagemath.org/ticket/11887#comment:3
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>needs_review</em>
</li>
</ul>
<p>
I'm happy with your part of the patch, by the way.
</p>
TicketLeif LeonhardySat, 01 Oct 2011 20:01:17 GMT
https://trac.sagemath.org/ticket/11887#comment:4
https://trac.sagemath.org/ticket/11887#comment:4
<pre class="wiki"> See the function :func:`sage.misc.cython.cython` for documentation
for the other inputs.
</pre><p>
which leads to <code>TODO</code>... :)
</p>
<p>
I'm almost ok with your changes, will test them shortly, so we should have a positive review then.
</p>
<p>
I think <code>compile_and_load()</code> should also take keyword arguments, but that's for another ticket. Perhaps just add another <code>TODO</code>.
</p>
TicketJohn PalmieriSat, 01 Oct 2011 22:22:45 GMT
https://trac.sagemath.org/ticket/11887#comment:5
https://trac.sagemath.org/ticket/11887#comment:5
<p>
I would consider the phrasing
</p>
<pre class="wiki"> The other inputs should be described in the documentation for the
function :func:`sage.misc.cython.cython`.
</pre><p>
I couldn't think of any way to say it which wouldn't require changing if (when) the <code>cython</code> function actually gets documented.
</p>
TicketLeif LeonhardySun, 02 Oct 2011 00:10:45 GMT
https://trac.sagemath.org/ticket/11887#comment:6
https://trac.sagemath.org/ticket/11887#comment:6
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11887#comment:5" title="Comment 5">jhpalmieri</a>:
</p>
<blockquote class="citation">
<p>
I would consider the phrasing
</p>
</blockquote>
<pre class="wiki"> The other inputs should be described in the documentation for the
function :func:`sage.misc.cython.cython`.
</pre><blockquote class="citation">
<p>
I couldn't think of any way to say it which wouldn't require changing if (when) the <code>cython</code> function actually gets documented.
</p>
</blockquote>
<p>
That's pretty ok XD
</p>
TicketDima PasechnikSun, 02 Oct 2011 17:05:53 GMTstatus changed
https://trac.sagemath.org/ticket/11887#comment:7
https://trac.sagemath.org/ticket/11887#comment:7
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>needs_info</em>
</li>
</ul>
<p>
After applying this patch <code>make ptestlong</code> ends with
</p>
<pre class="wiki">...
----------------------------------------------------------------------
The temporary doctesting directory
/home/dima/.sage/tmp/spms_banana-30578
was not removed: it is not empty, presumably because doctests
failed or doctesting was interrupted.
----------------------------------------------------------------------
The following tests failed:
sage -t -long -force_lib devel/sage/sage/interfaces/sage0.py # 11 doctests failed
----------------------------------------------------------------------
Total time for all tests: 2884.8 seconds
make: *** [ptestlong] Error 128
</pre><p>
The test in question gives the following:
</p>
<pre class="wiki">
sage -t -long -force_lib "devel/sage/sage/interfaces/sage0.py"
**********************************************************************
File "/usr/local/src/sage/sage-4.7.2.alpha3/devel/sage/sage/interfaces/sage0.py", line 448:
sage: F == sage0(F)._sage_()
Exception raised:
Traceback (most recent call last):
File "/usr/local/src/sage/sage-4.7.2.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/usr/local/src/sage/sage-4.7.2.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
File "/usr/local/src/sage/sage-4.7.2.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_20[4]>", line 1, in <module>
F == sage0(F)._sage_()###line 448:
sage: F == sage0(F)._sage_()
File "/usr/local/src/sage/sage-4.7.2.alpha3/local/lib/python/site-packages/sage/interfaces/sage0.py", line 458, in _sage_
return load(P._local_tmpfile())
File "sage_object.pyx", line 775, in sage.structure.sage_object.load (sage/structure/sage_object.c:7811)
IOError: [Errno 2] No such file or directory: '/home/dima/.sage//temp/spms_banana/6133//interface//tmp6170.sobj'
**********************************************************************
File "/usr/local/src/sage/sage-4.7.2.alpha3/devel/sage/sage/interfaces/sage0.py", line 466:
sage: four_gcd(6)
Expected:
2
Got:
<BLANKLINE>
**********************************************************************
(truncated)
</pre><p>
any clue?
</p>
<p>
Dima
</p>
TicketJohn PalmieriSun, 02 Oct 2011 19:58:32 GMT
https://trac.sagemath.org/ticket/11887#comment:8
https://trac.sagemath.org/ticket/11887#comment:8
<p>
I'm unable to duplicate this failure. On the other hand, I think I've seen failures for the file sage0.py randomly and nonrepeatably, having nothing to do with this ticket. Is this failure repeatable, and if so, can you confirm that it happens because of the patch here?
</p>
TicketDima PasechnikMon, 03 Oct 2011 06:50:23 GMTstatus changed
https://trac.sagemath.org/ticket/11887#comment:9
https://trac.sagemath.org/ticket/11887#comment:9
<ul>
<li><strong>status</strong>
changed from <em>needs_info</em> to <em>needs_review</em>
</li>
</ul>
<p>
Replying to <a class="ticket" href="https://trac.sagemath.org/ticket/11887#comment:8" title="Comment 8">jhpalmieri</a>:
</p>
<blockquote class="citation">
<p>
I'm unable to duplicate this failure. On the other hand, I think I've seen failures for the file sage0.py randomly and nonrepeatably, having nothing to do with this ticket. Is this failure repeatable, and if so, can you confirm that it happens because of the patch here?
</p>
</blockquote>
<p>
Yesterday I had duplicated it like 5 or 6 times, and today it doesn't want to be duplicated.
Scary...
</p>
TicketJeroen DemeyerFri, 14 Oct 2011 16:24:07 GMT
https://trac.sagemath.org/ticket/11887#comment:10
https://trac.sagemath.org/ticket/11887#comment:10
<p>
This ticket is listed as the only remaining blocker for sage-4.7.2. Could somebody please review this ticket or somehow decide it's not worth merging in sage-4.7.2.
</p>
TicketJohn PalmieriFri, 14 Oct 2011 18:07:21 GMT
https://trac.sagemath.org/ticket/11887#comment:11
https://trac.sagemath.org/ticket/11887#comment:11
<p>
I can give line 633 of the patch a positive review: that was contributed by Leif. The rest of it should be reviewed by someone other than me.
</p>
TicketJeroen DemeyerMon, 17 Oct 2011 11:55:57 GMTstatus changed; reviewer, resolution, merged set
https://trac.sagemath.org/ticket/11887#comment:12
https://trac.sagemath.org/ticket/11887#comment:12
<ul>
<li><strong>status</strong>
changed from <em>needs_review</em> to <em>closed</em>
</li>
<li><strong>reviewer</strong>
set to <em>Jeroen Demeyer</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>merged</strong>
set to <em>sage-4.7.2.rc0</em>
</li>
</ul>
TicketJohn PalmieriTue, 25 Oct 2011 22:50:15 GMT
https://trac.sagemath.org/ticket/11887#comment:13
https://trac.sagemath.org/ticket/11887#comment:13
<p>
See <a class="closed ticket" href="https://trac.sagemath.org/ticket/11954" title="#11954: defect: improve the documentation of sage/misc/cython.py (closed: fixed)">#11954</a> for a follow-up.
</p>
Ticket