Skip to content

Always use python to run the pexpect interface #39996

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

antonio-rojas
Copy link
Contributor

@antonio-rojas antonio-rojas commented Apr 21, 2025

sage-ipython is no longer available in the meson build

Fixes #39869

sage-ipython is no longer available in the meson build
Copy link

github-actions bot commented Apr 21, 2025

Documentation preview for this PR (built with commit a6b5fa4; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

Copy link
Contributor

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@vbraun
Copy link
Member

vbraun commented Apr 28, 2025

I'm getting

Doctesting 1 file.
sage -t --long --warn-long 30.0 --random-seed=123 src/sage/misc/randstate.pyx
**********************************************************************
File "src/sage/misc/randstate.pyx", line 130, in sage.misc.randstate
Failed example:
    s = ZZ(subsage('initial_seed()'))
Exception raised:
    Traceback (most recent call last):
      File "/home/release/Sage/src/sage/doctest/forker.py", line 730, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/release/Sage/src/sage/doctest/forker.py", line 1154, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.misc.randstate[30]>", line 1, in <module>
        s = ZZ(subsage('initial_seed()'))
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/release/Sage/src/sage/interfaces/sage0.py", line 239, in __call__
        return SageElement(self, x)
               ^^^^^^^^^^^^^^^^^^^^
      File "/home/release/Sage/src/sage/interfaces/expect.py", line 1518, in __init__
        self._name = parent._create(value, name=name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/release/Sage/src/sage/interfaces/interface.py", line 520, in _create
        self.set(name, value)
      File "/home/release/Sage/src/sage/interfaces/sage0.py", line 319, in set
        raise TypeError("Error executing code in Sage\nCODE:\n\t%s\nSage ERROR:\n\t%s" % (cmd, out))
    TypeError: Error executing code in Sage
    CODE:
    	sage0=initial_seed()
    Sage ERROR:
    	Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
        sage0=initial_seed()
              ^^^^^^^^^^^^
    NameError: name 'initial_seed' is not defined
**********************************************************************

@tobiasdiez
Copy link
Contributor

Now one test has timeout issues (see meson ci).

@vbraun would it be possible to preinstall a suitable python on the bots so that they don't use sage's python build?

Some tests spawn a sage subshell which changes the prompt and confuses the expect instance
@antonio-rojas
Copy link
Contributor Author

Should be fine now, please review again

vbraun pushed a commit to vbraun/sage that referenced this pull request May 4, 2025
sagemathgh-39996: Always use python to run the pexpect interface
    
sage-ipython is no longer available in the meson build

Fixes sagemath#39869
    
URL: sagemath#39996
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request May 5, 2025
sagemathgh-39996: Always use python to run the pexpect interface
    
sage-ipython is no longer available in the meson build

Fixes sagemath#39869
    
URL: sagemath#39996
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this pull request May 6, 2025
sagemathgh-39996: Always use python to run the pexpect interface
    
sage-ipython is no longer available in the meson build

Fixes sagemath#39869
    
URL: sagemath#39996
Reported by: Antonio Rojas
Reviewer(s): Tobias Diez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Meson build: sage pexpect interface broken due to missing sage-ipython
3 participants