Skip to content

Commit c126c9e

Browse files
authored
MNT: re-enable jedi completion for environments that use newer IPython builds
1 parent b705967 commit c126c9e

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

hutch_python/cli.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ def configure_tab_completion(ipy_config):
8585
"""
8686
Disable Jedi and tweak IPython tab completion.
8787
88+
At some IPython version this became no longer needed due to fixed performance issues
89+
stemming from no longer by default executing properties.
90+
91+
At some IPython version this became counterproductive because the non-jedi
92+
completer no longer works properly for us.
93+
94+
This change happend somewhere between 8.4.0 and 8.36.0
95+
8896
Parameters
8997
----------
9098
ipy_config : traitlets.config.Config
@@ -135,8 +143,11 @@ def configure_ipython_session(args: HutchPythonArgs):
135143

136144
# Disable reformatting input with black
137145
ipy_config.TerminalInteractiveShell.autoformatter = None
138-
# Set up tab completion modifications
139-
configure_tab_completion(ipy_config)
146+
147+
if IPython.version_info < (8, 5, 0):
148+
# Set up tab completion modifications
149+
# The last version we deployed that needed this is 8.4.0
150+
configure_tab_completion(ipy_config)
140151

141152
# disable default banner
142153
ipy_config.TerminalIPythonApp.display_banner = False

0 commit comments

Comments
 (0)