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
Call sympy_init() at sympy import #24067
Comments
Branch: u/rws/24067 |
This comment has been minimized.
This comment has been minimized.
Commit: |
Last 10 new commits:
|
Dependencies: #24062 |
Author: Ralf Stephan |
Changed branch from u/rws/24067 to u/jdemeyer/24067 |
Reviewer: Jeroen Demeyer |
Changed dependencies from #24062 to none |
comment:4
Rebased to 8.1.rc2 for easier reviewing. New commits:
|
comment:6
Positive review to your first commit. I added two follow-up commits, please review. |
comment:7
I am concerned that the sympy patch cannot be sent upstream as is. It makes sage a dependency of sympy for it to even start. I doubt that's acceptable. |
comment:8
What about just adding |
comment:9
Replying to @tscrim:
I would favor an all in sage solution to this. I am not against a push in sympy upstream but it has to be acceptable to them and that will certainly not be. |
comment:10
Replying to @kiwifb:
To make it work the Additions LGTM. |
Changed reviewer from Jeroen Demeyer to Jeroen Demeyer, Ralf Stephan |
comment:11
What about guarding it with a |
comment:12
fbissey: I am assuming that this ticket would only be merged in some 8.2.beta of Sage. Since this branch here does solve the immediate problem of docbuilding, I suggest to merge this patch as-is and in the mean time work on a solution for upstream. |
comment:13
Replying to @jdemeyer:
I was hoping a more conciliatory attitude and hadn't removed the positive review. This is now back to need_work. This is just un-acceptable to sage-on-distro this close to release. We would have to make our own version of the patch that does the "right thing" (TM) instead of a "sloppy job" (TM) just because we can and feel in too much of a hurry for 3 more lines of code, anyway so let's do it right now instead. |
comment:16
@kiwifb, that last commit, while much better than what was before, will still force all users of sympy to import sage into their python program, as long as sage is installed. A better method might be something like this instead:
where XXXX is some module that sage always imports. So the patch is only activated if sage is already imported. This might be more acceptable to upstream as well. |
comment:17
@infinity0 I agree that is not perfect - for exactly the reason you mention - but that's the best I could come up with without more complication. Feel free to improve it, that's one of the reason I called other packagers on this ticket. |
comment:18
So what about using If you additionally need to support the use-case where a third-party program/library really has to import sympy then later import sage (I can't imagine why), then the In any case, we're unlikely to patch sympy in Debian like this, unless they indicate that they would already accept it. (Someone else maintains it, the situation is outside of my control.) Could you/someone else file a upstream ticket before releasing this in Sage? |
comment:19
Replying to @infinity0:
I can make that change, but I am calling it a night :)
+1, @rwst do you have an upstream issue for this? There definitely should be. |
comment:21
Replying to @kiwifb:
Even for a beta version of Sage? I agree that it would be unacceptable in a released version. |
comment:22
If we're going to submit a patch upstream, we shouldn't rush. |
This comment has been minimized.
This comment has been minimized.
Stopgaps: #24238 |
comment:24
Replying to @jdemeyer:
Come on. We are at rc2. We are just ironing bugs, that would end up in the released 8.1 unless you moved the milestone to 8.2. |
comment:25
I would be surprised if this was positively reviewed it would make it into 8.1 (unless we set it as a blocker). |
comment:27
The third option would be a revert ticket for the manifolds changes that introduced it. |
comment:28
Replying to @kiwifb:
#24238 is a blocker. That ticket is also simple enough that it shouldn't cause problems. |
comment:29
Replying to @kiwifb:
No. I'm pretty sure that the release manager only merges "blocker" tickets once an rc has been released. The whole point of an "rc" is that it should be close to a release and you don't want to merge random tickets at that point. Anyway, that doesn't matter anymore for this ticket. |
Changed author from Ralf Stephan to none |
Changed reviewer from Jeroen Demeyer, Ralf Stephan to none |
comment:31
Time to close this bizarre ticket |
comment:32
I am not remembering much about it but obviously it didn't make the cut then. |
Reviewer: François Bissey |
sympy_init()
enables conversion of SymPy objects. It is called with the first initialization of aSympyConverter
, i.e. withExpression._sympy_()
. Better is to only call it once with any import of SymPy.We should also revert the patch added in #24238.
CC: @jdemeyer @isuruf @infinity0 @egourgoulhon
Component: interfaces
Stopgaps: #24238
Branch/Commit: u/fbissey/24067 @
67e6156
Reviewer: François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/24067
The text was updated successfully, but these errors were encountered: