Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 831187 - dev-python/ipython-8.0.0: no module named 'stack_data'
Summary: dev-python/ipython-8.0.0: no module named 'stack_data'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 831193 831200 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-14 11:25 UTC by Alexander Sergeyev
Modified: 2022-01-14 16:32 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sergeyev 2022-01-14 11:25:38 UTC
ipython fails to start with an import error:

~ $ ipython
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/ipython", line 33, in <module>
    sys.exit(load_entry_point('ipython==8.0.0', 'console_scripts', 'ipython')())
  File "/usr/lib/python-exec/python3.9/ipython", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/IPython/__init__.py", line 51, in <module>
    from .core.application import Application
  File "/usr/lib/python3.9/site-packages/IPython/core/application.py", line 27, in <module>
    from IPython.core import release, crashhandler
  File "/usr/lib/python3.9/site-packages/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/usr/lib/python3.9/site-packages/IPython/core/ultratb.py", line 101, in <module>
    import stack_data
ModuleNotFoundError: No module named 'stack_data'

With dev-python/stack_data installed, the next failure is:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/ipython", line 33, in <module>
    sys.exit(load_entry_point('ipython==8.0.0', 'console_scripts', 'ipython')())
  File "/usr/lib/python-exec/python3.9/ipython", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/IPython/__init__.py", line 51, in <module>
    from .core.application import Application
  File "/usr/lib/python3.9/site-packages/IPython/core/application.py", line 27, in <module>
    from IPython.core import release, crashhandler
  File "/usr/lib/python3.9/site-packages/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/usr/lib/python3.9/site-packages/IPython/core/ultratb.py", line 101, in <module>
    import stack_data
  File "/usr/lib/python3.9/site-packages/stack_data/__init__.py", line 1, in <module>
    from .core import Source, FrameInfo, markers_from_ranges, Options, LINE_GAP, Line, Variable, RangeInLine, \
  File "/usr/lib/python3.9/site-packages/stack_data/core.py", line 14, in <module>
    import executing
ModuleNotFoundError: No module named 'executing'

With dev-python/executing installed, the next failure is:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/ipython", line 33, in <module>
    sys.exit(load_entry_point('ipython==8.0.0', 'console_scripts', 'ipython')())
  File "/usr/lib/python-exec/python3.9/ipython", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/IPython/__init__.py", line 51, in <module>
    from .core.application import Application
  File "/usr/lib/python3.9/site-packages/IPython/core/application.py", line 27, in <module>
    from IPython.core import release, crashhandler
  File "/usr/lib/python3.9/site-packages/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/usr/lib/python3.9/site-packages/IPython/core/ultratb.py", line 101, in <module>
    import stack_data
  File "/usr/lib/python3.9/site-packages/stack_data/__init__.py", line 1, in <module>
    from .core import Source, FrameInfo, markers_from_ranges, Options, LINE_GAP, Line, Variable, RangeInLine, \
  File "/usr/lib/python3.9/site-packages/stack_data/core.py", line 15, in <module>
    from asttokens.util import Token
ModuleNotFoundError: No module named 'asttokens'

With dev-python/asttokens installed, the next failure is:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/ipython", line 33, in <module>
    sys.exit(load_entry_point('ipython==8.0.0', 'console_scripts', 'ipython')())
  File "/usr/lib/python-exec/python3.9/ipython", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/IPython/__init__.py", line 51, in <module>
    from .core.application import Application
  File "/usr/lib/python3.9/site-packages/IPython/core/application.py", line 27, in <module>
    from IPython.core import release, crashhandler
  File "/usr/lib/python3.9/site-packages/IPython/core/crashhandler.py", line 28, in <module>
    from IPython.core import ultratb
  File "/usr/lib/python3.9/site-packages/IPython/core/ultratb.py", line 101, in <module>
    import stack_data
  File "/usr/lib/python3.9/site-packages/stack_data/__init__.py", line 1, in <module>
    from .core import Source, FrameInfo, markers_from_ranges, Options, LINE_GAP, Line, Variable, RangeInLine, \
  File "/usr/lib/python3.9/site-packages/stack_data/core.py", line 17, in <module>
    from pure_eval import Evaluator, is_expression_interesting
ModuleNotFoundError: No module named 'pure_eval'

With dev-python/pure_eval installed, ipython finally can be properly started.

Reproducible: Always

Steps to Reproduce:
1. Install ipython-8
2. Run ipython command and observe failure.
Actual Results:  
Ipython invokation fails with an import error call stack.

Expected Results:  
Ipython should run with no issues.

It seems that:
1) dev-python/ipython-8.0.0 should depend on dev-python/stack_data;
2) dev-python/stack_data should depend on dev-python/executing, dev-python/asttokens and dev-python/pure_eval.

Versions and USE flags:
dev-python/ipython-8.0.0 -doc -examples -matplotlib -nbconvert -notebook -qt5 -smp -test PYTHON_TARGETS="python3_9 -python3_8 -python3_10"
dev-python/ipython_genutils-0.2.0-r2 -test PYTHON_TARGETS="python3_9 -python3_8 -python3_10"
dev-python/executing-0.8.2 -test PYTHON_TARGETS="python3_9 -python3_8 -python3_10"
dev-python/pure_eval-0.2.1-r1 -test PYTHON_TARGETS="python3_9 -python3_8 -python3_10"
dev-python/stack_data-0.1.3 -test PYTHON_TARGETS="python3_9 -python3_8 -python3_10"
Comment 1 Alexander Sergeyev 2022-01-14 11:41:03 UTC
Sorry I've missed the other report. But still, necessary dev-python/stack_data dependencies are conditional on USE=+test and marked as BDEPEND and not RDEPEND.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-14 11:41:55 UTC
(In reply to Alexander Sergeyev from comment #1)
> Sorry I've missed the other report. But still, necessary
> dev-python/stack_data dependencies are conditional on USE=+test and marked
> as BDEPEND and not RDEPEND.

yep, on it (thanks!)
Comment 3 Larry the Git Cow gentoo-dev 2022-01-14 12:52:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59392ba216311511cb07b1db528759ebceb6a10e

commit 59392ba216311511cb07b1db528759ebceb6a10e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-14 12:52:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-14 12:52:29 +0000

    dev-python/stack_data: fix RDEPEND
    
    Some of its test dependencies are runtime dependencies too.
    
    Closes: https://bugs.gentoo.org/831187
    Closes: https://bugs.gentoo.org/831141
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{stack_data-0.1.3.ebuild => stack_data-0.1.3-r1.ebuild}         | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-14 13:10:13 UTC
*** Bug 831193 has been marked as a duplicate of this bug. ***
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-14 16:32:51 UTC
*** Bug 831200 has been marked as a duplicate of this bug. ***