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: Fix issue #23497 #23498

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions spyder/plugins/projects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,12 @@ def on_mainwindow_visible(self):
# Open project passed on the command line or reopen last one.
cli_options = self.get_command_line_options()
initial_cwd = self._main.get_initial_working_directory()
connection_file = cli_options.connection_file

# Avoid conflicts with `--connect-to-kernel` option. See issue #23497
# for more information.
if connection_file is not None:
return
Comment on lines +295 to +298
Copy link
Member

@ccordoba12 ccordoba12 Jan 17, 2025

Choose a reason for hiding this comment

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

This will prevent opening the project passed through the command line, which would seem like an error to users. So, I don't think this is the right solution.

Instead, I propose to add a method to the IPython console called _handle_connect_to_kernel_cli that would receive connection_file and could be called after open_project below.


if cli_options.project is not None:
logger.debug('Opening project from the command line')
Expand Down
Loading