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
Give a warning when using citation.get_systems() without Cython profiling #23162
Labels
Milestone
Comments
Commit: |
Author: Jeroen Demeyer |
New commits:
|
comment:4
Works for me on OSX 10.10. |
Reviewer: Sébastien Labbé |
Changed keywords from none to thursdaysbdx |
Changed branch from u/jdemeyer/give_a_warning_when_using_citation_get_systems___without_cython_profiling to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sage.misc.citation.get_systems()
is implemented by usingcProfile
to look at which modules implement the functions called when executing the code.The problem is that this is totally unreliable when Cython is compiled without profiling support (which is the default). This doctest
only works because
Expression.expand()
is called by Python instead of Cython. If that call would be inside some other Cython code, then Python's profiler would not detect it:There is a problem because #22747 will "break" profiling even further as even the top-level call of
Expression.expand()
would not be detected as something to be entered in the profiler.So here I propose simply to give a warning whenever
get_systems()
is used when profiling was not enabled.CC: @seblabbe
Component: cython
Keywords: thursdaysbdx
Author: Jeroen Demeyer
Branch/Commit:
ae120c5
Reviewer: Sébastien Labbé
Issue created by migration from https://trac.sagemath.org/ticket/23162
The text was updated successfully, but these errors were encountered: