Skip to content

Commit 4d8528c

Browse files
authored
Merge pull request #4533 from ccordoba12/pyconsole-2
PR: Remove connection between Help and the Python Console
2 parents b24fe30 + f6d74a4 commit 4d8528c

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

Diff for: spyder/config/main.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@
254254
'max_history_entries': 20,
255255
'wrap': True,
256256
'connect/editor': False,
257-
'connect/python_console': False,
258257
'connect/ipython_console': False,
259258
'math': True,
260259
'automatic_import': True,
@@ -656,7 +655,7 @@
656655
# or if you want to *rename* options, then you need to do a MAJOR update in
657656
# version, e.g. from 3.0.0 to 4.0.0
658657
# 3. You don't need to touch this value if you're just adding a new option
659-
CONF_VERSION = '36.0.0'
658+
CONF_VERSION = '37.0.0'
660659

661660
# Main configuration instance
662661
try:

Diff for: spyder/plugins/externalconsole.py

-14
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ def __init__(self, parent):
279279
self.tabwidget = None
280280
self.menu_actions = None
281281

282-
self.help = None # Help plugin
283282
self.historylog = None # History log plugin
284283

285284
self.python_count = 0
@@ -618,10 +617,6 @@ def start(self, fname, wdir=None, args='', interact=False, debug=False,
618617
self.get_option('codecompletion/case_sensitive') )
619618
shellwidget.shell.set_codecompletion_enter(
620619
self.get_option('codecompletion/enter_key') )
621-
if python and self.help is not None:
622-
shellwidget.shell.set_help(self.help)
623-
shellwidget.shell.set_help_enabled(
624-
CONF.get('help', 'connect/python_console'))
625620
if self.historylog is not None:
626621
self.historylog.add_history(shellwidget.shell.history_filename)
627622
shellwidget.shell.append_to_history.connect(
@@ -702,8 +697,6 @@ def process_started(self, shell_id):
702697
shell = self.shellwidgets[index]
703698
icon, _icon = self.icons[index]
704699
self.tabwidget.setTabIcon(index, icon)
705-
if self.help is not None:
706-
self.help.set_shell(shell.shell)
707700

708701
def process_finished(self, shell_id):
709702
index = self.get_shell_index_from_id(shell_id)
@@ -759,7 +752,6 @@ def get_plugin_actions(self):
759752
def register_plugin(self):
760753
"""Register plugin in Spyder's main window"""
761754
self.main.add_dockwidget(self)
762-
self.help = self.main.help
763755
self.historylog = self.main.historylog
764756
self.edit_goto.connect(self.main.editor.load)
765757
self.edit_goto[str, int, str, bool].connect(
@@ -821,7 +813,6 @@ def refresh_plugin(self):
821813
self.tabwidget.set_corner_widgets({Qt.TopRightCorner: widgets})
822814
if shellwidget:
823815
shellwidget.update_time_label_visibility()
824-
self.help.set_shell(shellwidget.shell)
825816
self.main.last_console_plugin_focus_was_python = True
826817
self.update_plugin_title.emit()
827818

@@ -842,8 +833,6 @@ def apply_plugin_settings(self, options):
842833
icontext_o = self.get_option(icontext_n)
843834
calltips_n = 'calltips'
844835
calltips_o = self.get_option(calltips_n)
845-
help_n = 'connect_to_oi'
846-
help_o = CONF.get('help', 'connect/python_console')
847836
wrap_n = 'wrap'
848837
wrap_o = self.get_option(wrap_n)
849838
compauto_n = 'codecompletion/auto'
@@ -861,9 +850,6 @@ def apply_plugin_settings(self, options):
861850
shellwidget.set_icontext_visible(icontext_o)
862851
if calltips_n in options:
863852
shellwidget.shell.set_calltips(calltips_o)
864-
if help_n in options:
865-
if isinstance(shellwidget, ExternalPythonShell):
866-
shellwidget.shell.set_help_enabled(help_o)
867853
if wrap_n in options:
868854
shellwidget.shell.toggle_wrap_mode(wrap_o)
869855
if compauto_n in options:

Diff for: spyder/plugins/help.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,13 @@ def setup_page(self):
123123
editor_tip = _("This feature requires the Rope or Jedi libraries.\n"
124124
"It seems you don't have either installed.")
125125
editor_box.setToolTip(editor_tip)
126-
python_box = self.create_checkbox(_("Python Console"),
127-
'connect/python_console')
128126
ipython_box = self.create_checkbox(_("IPython Console"),
129127
'connect/ipython_console')
130128
ipython_box.setEnabled(QTCONSOLE_INSTALLED)
131129

132130
connections_layout = QVBoxLayout()
133131
connections_layout.addWidget(connections_label)
134132
connections_layout.addWidget(editor_box)
135-
connections_layout.addWidget(python_box)
136133
connections_layout.addWidget(ipython_box)
137134
connections_group.setLayout(connections_layout)
138135

@@ -547,7 +544,6 @@ def apply_plugin_settings(self, options):
547544

548545
# To make auto-connection changes take place instantly
549546
self.main.editor.apply_plugin_settings(options=[connect_n])
550-
self.main.extconsole.apply_plugin_settings(options=[connect_n])
551547
if self.main.ipyconsole is not None:
552548
self.main.ipyconsole.apply_plugin_settings(options=[connect_n])
553549

@@ -816,8 +812,8 @@ def __eventually_raise_help(self, text, force=False):
816812
and (force or text != self._last_texts[index]):
817813
dockwidgets = self.main.tabifiedDockWidgets(self.dockwidget)
818814
if self.main.console.dockwidget not in dockwidgets and \
819-
(hasattr(self.main, 'extconsole') and \
820-
self.main.extconsole.dockwidget not in dockwidgets):
815+
(hasattr(self.main, 'ipyconsole') and \
816+
self.main.ipyconsole.dockwidget not in dockwidgets):
821817
self.dockwidget.show()
822818
self.dockwidget.raise_()
823819
self._last_texts[index] = text
@@ -901,8 +897,6 @@ def get_shell(self):
901897
shell = self.main.ipyconsole.get_current_shellwidget()
902898
if shell is not None and shell.kernel_client is not None:
903899
self.shell = shell
904-
if self.shell is None and self.main.extconsole is not None:
905-
self.shell = self.main.extconsole.get_running_python_shell()
906900
if self.shell is None:
907901
self.shell = self.internal_shell
908902
return self.shell

0 commit comments

Comments
 (0)