Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cython.py: don't create .html and .c files when running compile_and_load #11887

Closed
jhpalmieri opened this issue Oct 1, 2011 · 14 comments
Closed

Comments

@jhpalmieri
Copy link
Member

This ticket should fix for the problem discussed at at #11680: the patch there causes some .c and .html files to be created when doctesting.

CC: @nexttime

Component: misc

Author: Leif Leonhardy, John Palmieri

Reviewer: Jeroen Demeyer

Merged: sage-4.7.2.rc0

Issue created by migration from https://trac.sagemath.org/ticket/11887

@nexttime
Copy link
Mannequin

nexttime mannequin commented Oct 1, 2011

comment:1

Attachment: trac_11887-cython.patch.gz

I was just about to open such a ticket... (with priority "trivial" though) :)

If my patch is sufficient for you, you could review it... :P

@jhpalmieri
Copy link
Member Author

comment:2

Leif: I've listed both of us as authors for the patch. I took your patch from #11680 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.

@jhpalmieri
Copy link
Member Author

comment:3

I'm happy with your part of the patch, by the way.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Oct 1, 2011

comment:4
    See the function :func:`sage.misc.cython.cython` for documentation 
    for the other inputs.

which leads to TODO... :)

I'm almost ok with your changes, will test them shortly, so we should have a positive review then.

I think compile_and_load() should also take keyword arguments, but that's for another ticket. Perhaps just add another TODO.

@jhpalmieri
Copy link
Member Author

comment:5

I would consider the phrasing

    The other inputs should be described in the documentation for the
    function :func:`sage.misc.cython.cython`.

I couldn't think of any way to say it which wouldn't require changing if (when) the cython function actually gets documented.

@nexttime
Copy link
Mannequin

nexttime mannequin commented Oct 2, 2011

comment:6

Replying to @jhpalmieri:

I would consider the phrasing

    The other inputs should be described in the documentation for the
    function :func:`sage.misc.cython.cython`.

I couldn't think of any way to say it which wouldn't require changing if (when) the cython function actually gets documented.

That's pretty ok XD

@dimpase
Copy link
Member

dimpase commented Oct 2, 2011

comment:7

After applying this patch make ptestlong ends with

...
----------------------------------------------------------------------
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

The test in question gives the following:


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)

any clue?

Dima

@jhpalmieri
Copy link
Member Author

comment:8

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?

@dimpase
Copy link
Member

dimpase commented Oct 3, 2011

comment:9

Replying to @jhpalmieri:

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?

Yesterday I had duplicated it like 5 or 6 times, and today it doesn't want to be duplicated.
Scary...

@jdemeyer
Copy link
Contributor

comment:10

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.

@jhpalmieri
Copy link
Member Author

comment:11

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.

@jdemeyer
Copy link
Contributor

Reviewer: Jeroen Demeyer

@jdemeyer
Copy link
Contributor

Merged: sage-4.7.2.rc0

@jhpalmieri
Copy link
Member Author

comment:13

See #11954 for a follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants