Skip to content
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

PR: Avoid conda run capturing output in env activation (IPython console) #21788

Merged
merged 8 commits into from
Feb 11, 2024

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Feb 10, 2024

Description of Changes

  • We need this fix in master after PR: Always activate a conda environment for IPython consoles #21783.
  • Stop debugging before closing clients. That avoids freezes and segfaults when closing Spyder, which are side effects from the fixes done here.
  • Disable pdb_prevent_closing option when opening/closing projects. That's necessary to correctly restore the project or program session when a console is left in debugging mode (I discovered that bug while testing these changes).

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: @ccordoba12

- That restores capturing output from external processes and printing
segfaults to the console.
- Also, fix test_print_faulthandler because it started to fail due to
env activation for the default env.
- That allows to show our kernel error message in every client connected
to a conda environment that didn't start.
- Also, update comment in test_kernel_crash accordingly.
@ccordoba12 ccordoba12 added this to the v6.0beta1 milestone Feb 10, 2024
@ccordoba12 ccordoba12 self-assigned this Feb 10, 2024
@ccordoba12 ccordoba12 force-pushed the conda-run-no-capture branch 2 times, most recently from 476bfcb to 98b4ed6 Compare February 11, 2024 16:38
This fixes loading the project's session files or the ones in the
previous session if a console was left in debugging mode.
This prevents freezes when closing Spyder and either a kernel restart or
closing a client is requested while debugging.
@ccordoba12 ccordoba12 force-pushed the conda-run-no-capture branch 2 times, most recently from 13255db to 93b8739 Compare February 11, 2024 19:30
That's not really necessary because the plugin declares the same method,
so it was being called twice when the main window is closed.
@ccordoba12 ccordoba12 merged commit 58f8d24 into spyder-ide:master Feb 11, 2024
14 checks passed
@ccordoba12 ccordoba12 deleted the conda-run-no-capture branch February 11, 2024 22:54
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.

1 participant