ipykernel-helper 0.0.39__tar.gz → 0.0.41__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ipykernel-helper
3
- Version: 0.0.39
3
+ Version: 0.0.41
4
4
  Summary: Helpers for ipykernel and friends
5
5
  Author-email: Jeremy Howard <info@fast.ai>
6
6
  License: Apache-2.0
@@ -16,7 +16,7 @@ Requires-Python: >=3.9
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: python-fasthtml
19
- Requires-Dist: fastcore>=1.12.2
19
+ Requires-Dist: fastcore>=1.12.28
20
20
  Requires-Dist: toolslm>=0.3.13
21
21
  Requires-Dist: jedi
22
22
  Requires-Dist: ipython
@@ -0,0 +1,2 @@
1
+ __version__ = "0.0.41"
2
+ from .core import *
@@ -52,6 +52,7 @@ d = { 'settings': { 'branch': 'main',
52
52
  'ipykernel_helper/core.py'),
53
53
  'ipykernel_helper.core.get_md': ('core.html#get_md', 'ipykernel_helper/core.py'),
54
54
  'ipykernel_helper.core.gh_blob_to_raw': ('core.html#gh_blob_to_raw', 'ipykernel_helper/core.py'),
55
+ 'ipykernel_helper.core.inspect._getfile': ('core.html#inspect._getfile', 'ipykernel_helper/core.py'),
55
56
  'ipykernel_helper.core.load_ipython_extension': ( 'core.html#load_ipython_extension',
56
57
  'ipykernel_helper/core.py'),
57
58
  'ipykernel_helper.core.read_gh_repo': ('core.html#read_gh_repo', 'ipykernel_helper/core.py'),
@@ -9,7 +9,7 @@ __all__ = ['transient', 'run_cmd', 'get_md', 'scrape_url', 'gh_blob_to_raw', 're
9
9
  # %% ../nbs/00_core.ipynb #9470a755
10
10
  from fasthtml.common import *
11
11
  from fastcore.meta import delegates
12
- from fastcore.utils import patch,dict2obj
12
+ from fastcore.utils import patch,patch_to,dict2obj
13
13
  from fastcore.docments import sig_source,DocmentText
14
14
  from fastcore.net import HTTP404NotFoundError
15
15
  from fastcore.xtras import truncstr,maybe_await
@@ -369,19 +369,17 @@ def _get_info(self:Inspector, obj, oname='', formatter=None, info=None, detail_l
369
369
  from IPython.core.ultratb import SyntaxTB
370
370
 
371
371
  # %% ../nbs/00_core.ipynb #eaa7a5e8
372
- @patch
372
+ @patch()
373
373
  def structured_traceback(self:SyntaxTB, etype, evalue, etb, tb_offset=None, context=5):
374
374
  if hasattr(evalue, 'msg') and not isinstance(evalue.msg, str): evalue.msg = str(evalue.msg)
375
375
  return self._orig_structured_traceback(etype, evalue, etb, tb_offset=tb_offset, context=context)
376
376
 
377
377
  # %% ../nbs/00_core.ipynb #33cb1440
378
- if '_orig_getfile' not in globals():
379
- _orig_getfile = inspect.getfile
380
- def _getfile(obj): return str(_orig_getfile(obj))
381
- inspect.getfile = _getfile
378
+ @patch_to(inspect, nm="getfile")
379
+ def _getfile(obj): return str(inspect._orig_getfile(obj))
382
380
 
383
381
  # %% ../nbs/00_core.ipynb #ff4984b9
384
- @patch
382
+ @patch()
385
383
  async def run_cell_magic(self:InteractiveShell, magic_name, line, cell):
386
384
  result = self._orig_run_cell_magic(magic_name, line, cell)
387
385
  if inspect.iscoroutine(result): result = await result
@@ -395,4 +393,5 @@ def _await_cell_magic(lines):
395
393
  def load_ipython_extension(ip):
396
394
  ns = ip.user_ns
397
395
  for o in ('read_gh_repo','read_url','transient','run_cmd','maybe_await'): ns[o] = globals()[o]
398
- ip.input_transformer_manager.line_transforms.append(_await_cell_magic)
396
+ lts = ip.input_transformer_manager.line_transforms
397
+ if not any(getattr(f, '__name__', None) == '_await_cell_magic' for f in lts): lts.append(_await_cell_magic)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ipykernel-helper
3
- Version: 0.0.39
3
+ Version: 0.0.41
4
4
  Summary: Helpers for ipykernel and friends
5
5
  Author-email: Jeremy Howard <info@fast.ai>
6
6
  License: Apache-2.0
@@ -16,7 +16,7 @@ Requires-Python: >=3.9
16
16
  Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Requires-Dist: python-fasthtml
19
- Requires-Dist: fastcore>=1.12.2
19
+ Requires-Dist: fastcore>=1.12.28
20
20
  Requires-Dist: toolslm>=0.3.13
21
21
  Requires-Dist: jedi
22
22
  Requires-Dist: ipython
@@ -1,5 +1,5 @@
1
1
  python-fasthtml
2
- fastcore>=1.12.2
2
+ fastcore>=1.12.28
3
3
  toolslm>=0.3.13
4
4
  jedi
5
5
  ipython
@@ -12,7 +12,7 @@ license = {text = "Apache-2.0"}
12
12
  authors = [{name = "Jeremy Howard", email = "info@fast.ai"}]
13
13
  keywords = ['nbdev', 'jupyter', 'notebook', 'python']
14
14
  classifiers = ["Natural Language :: English", "Intended Audience :: Developers", "Development Status :: 3 - Alpha", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only"]
15
- dependencies = ['python-fasthtml', 'fastcore>=1.12.2', 'toolslm>=0.3.13', 'jedi', 'ipython', 'ipykernel', 'beautifulsoup4', 'lxml', 'html2text', 'cloudscraper', 'ghapi']
15
+ dependencies = ['python-fasthtml', 'fastcore>=1.12.28', 'toolslm>=0.3.13', 'jedi', 'ipython', 'ipykernel', 'beautifulsoup4', 'lxml', 'html2text', 'cloudscraper', 'ghapi']
16
16
 
17
17
  [project.urls]
18
18
  Repository = "https://github.com/AnswerDotAI/ipykernel-helper"
@@ -1,2 +0,0 @@
1
- __version__ = "0.0.39"
2
- from .core import *