execnb 0.3.1__tar.gz → 0.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {execnb-0.3.1/execnb.egg-info → execnb-0.3.3}/PKG-INFO +1 -1
- execnb-0.3.3/execnb/__init__.py +1 -0
- {execnb-0.3.1 → execnb-0.3.3}/execnb/shell.py +5 -0
- {execnb-0.3.1 → execnb-0.3.3/execnb.egg-info}/PKG-INFO +1 -1
- execnb-0.3.1/execnb/__init__.py +0 -1
- {execnb-0.3.1 → execnb-0.3.3}/LICENSE +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/MANIFEST.in +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/README.md +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/execnb/_modidx.py +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/execnb.egg-info/SOURCES.txt +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/execnb.egg-info/dependency_links.txt +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/execnb.egg-info/entry_points.txt +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/execnb.egg-info/requires.txt +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/execnb.egg-info/top_level.txt +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/pyproject.toml +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/setup.cfg +0 -0
- {execnb-0.3.1 → execnb-0.3.3}/tests/test_shell.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.3"
|
|
@@ -16,6 +16,8 @@ from fastcore.ansi import strip_ansi
|
|
|
16
16
|
|
|
17
17
|
import asyncio,io,multiprocessing,threading,types,traceback,builtins
|
|
18
18
|
from contextlib import contextmanager,suppress
|
|
19
|
+
from datetime import datetime,timezone
|
|
20
|
+
from time import perf_counter
|
|
19
21
|
try:
|
|
20
22
|
if sys.platform == 'darwin': multiprocessing.set_start_method("fork")
|
|
21
23
|
except RuntimeError: pass # if re-running cell
|
|
@@ -286,7 +288,10 @@ def cell(self:CaptureShell, cell, stdout=True, stderr=True, verbose=False, timeo
|
|
|
286
288
|
"Run `cell`, skipping if not code, and store outputs (and the execution count) back in cell"
|
|
287
289
|
if cell.cell_type!='code': return
|
|
288
290
|
self._cell_idx = cell.idx_ + 1
|
|
291
|
+
st,t0 = datetime.now(timezone.utc),perf_counter()
|
|
289
292
|
outs = self.run(cell.source, stdout=stdout, stderr=stderr, verbose=verbose, timeout=timeout)
|
|
293
|
+
cell.metadata['execution'] = {'iopub.execute_input': st.isoformat(),
|
|
294
|
+
'shell.execute_reply': datetime.now(timezone.utc).isoformat(), 'total': perf_counter()-t0}
|
|
290
295
|
cell.outputs = _dict2obj(outs) if outs else []
|
|
291
296
|
cell.execution_count = self.execution_count-1 # the count this run used: the shell has already advanced
|
|
292
297
|
|
execnb-0.3.1/execnb/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|