We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 430de34 commit a82efbeCopy full SHA for a82efbe
1 file changed
packages/bigframes/bigframes/session/__init__.py
@@ -524,19 +524,15 @@ def execution_history(
524
]
525
526
elif not all_cells:
527
- try:
528
- import IPython
529
-
530
- ipy = IPython.get_ipython()
531
- if ipy is not None and hasattr(ipy, "execution_count"):
532
- current_count = ipy.execution_count
533
- jobs = [
534
- job
535
- for job in jobs
536
- if job.get("cell_execution_count") == current_count
537
- ]
538
- except (ImportError, NameError):
539
- pass
+ from bigframes.core.utils import get_ipython_execution_count
+
+ current_count = get_ipython_execution_count()
+ if current_count is not None:
+ jobs = [
+ job
+ for job in jobs
+ if job.get("cell_execution_count") == current_count
+ ]
540
541
return _ExecutionHistory(jobs)
542
0 commit comments