Skip to content

remove unset TERM when initializing non-interactive sage #40495

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 1 commit into
base: develop
Choose a base branch
from

Conversation

unprintable123
Copy link

@unprintable123 unprintable123 commented Jul 28, 2025

Sage unsets the environment variable TERM, which disables colored output by default. This behavior also causes error for packages that depend on curses.setupterm because curses.setupterm raises an error when TERM is unset.

pwntools is also affected by this issue. #39334 3-manifolds/Sage_macOS#78

The original issue #12263 is 13 years ago and has been resolved since python 3.5.

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

@orlitzky
Copy link
Contributor

pwntools was supposedly fixed! See Gallopsled/pwntools#1658

In any case, this is sensible if the CI is green. No user-facing scripts should be messing with TERM.

@unprintable123
Copy link
Author

I can still reproduce the bug with the latest versions of pwntools and sage.

@unprintable123
Copy link
Author

Gallopsled/pwntools#2594

@orlitzky
Copy link
Contributor

@vbraun how do we approve the CI for first-time contributors?

@vbraun
Copy link
Member

vbraun commented Jul 29, 2025

There is an "Approve workflow to run" button

@orlitzky
Copy link
Contributor

There is an "Approve workflow to run" button

not for me :(

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.

3 participants