Skip to content

Commit 7c4bcb9

Browse files
authored
Merge pull request piccolo-orm#19 from piccolo-orm/ipython_improvements
iPython improvements
2 parents f24365a + ca29dc9 commit 7c4bcb9

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

piccolo/apps/playground/commands/run.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ def run(
132132
import IPython
133133
except ImportError:
134134
print(
135-
"Install iPython using `pip install ipython==7.6.1` to use this "
136-
"feature."
135+
"Install iPython using `pip install ipython` to use this feature."
137136
)
138137
sys.exit(1)
139138

@@ -176,4 +175,7 @@ def run(
176175
print("\n")
177176

178177
populate()
179-
IPython.embed()
178+
179+
from IPython.core.interactiveshell import _asyncio_runner
180+
181+
IPython.embed(using=_asyncio_runner)

piccolo/apps/shell/commands/run.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ def start_ipython_shell(**tables: t.Dict[str, t.Type[Table]]):
1010
import IPython
1111
except ImportError:
1212
print(
13-
"Install iPython using `pip install ipython==7.6.1` to use this "
14-
"feature."
13+
"Install iPython using `pip install ipython` to use this feature."
1514
)
1615
sys.exit(1)
1716

@@ -20,7 +19,9 @@ def start_ipython_shell(**tables: t.Dict[str, t.Type[Table]]):
2019
if table_class_name not in existing_global_names:
2120
globals()[table_class_name] = table_class
2221

23-
IPython.embed()
22+
from IPython.core.interactiveshell import _asyncio_runner
23+
24+
IPython.embed(using=_asyncio_runner)
2425

2526

2627
def run():

0 commit comments

Comments
 (0)