Skip to content

Fix doctests with ipython 8.12#35423

Merged
vbraun merged 2 commits intosagemath:developfrom
tornaria:ipython-8.12
Apr 6, 2023
Merged

Fix doctests with ipython 8.12#35423
vbraun merged 2 commits intosagemath:developfrom
tornaria:ipython-8.12

Conversation

@tornaria
Copy link
Copy Markdown
Member

@tornaria tornaria commented Apr 2, 2023

📚 Description

As reported in #35337 (comment), the update to ipython 8.12 introduces some useless output when calling get_ipython().enable_gui(...) which causes a few doctest failures.

This PR silences this output by (temporarily) redirecting stdout to a string.

This is only one commit that sits right on top of e9c3333 from #35337.

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • Existing tests already cover the changes.

⌛ Dependencies

@tornaria
Copy link
Copy Markdown
Member Author

tornaria commented Apr 3, 2023

I don't undestand the check failures. They are certainly unrelated to this PR. What confuses me is that #35337 had all checks passed and this PR has just one small commit on top.

@tornaria
Copy link
Copy Markdown
Member Author

tornaria commented Apr 3, 2023

I merged with develop (10.0.beta7) and get the same failures, so I'm undoing the (useless) merge.

@kiwifb
Copy link
Copy Markdown
Member

kiwifb commented Apr 3, 2023

I agree the failures are unrelated to this. As far as I understand things. I will switch to ipython 8.12.0 sometimes today to look at this properly.

Copy link
Copy Markdown
Member

@kiwifb kiwifb left a comment

Choose a reason for hiding this comment

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

Checked it works with both ipython 8.11 and 8.12 without problems.

@vbraun vbraun merged commit 50767c4 into sagemath:develop Apr 6, 2023
@tornaria tornaria mentioned this pull request May 5, 2023
4 tasks
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.

4 participants