Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 821274 - dev-python/mypy-0.910 should depend on dev-python/toml
Summary: dev-python/mypy-0.910 should depend on dev-python/toml
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:
Depends on:
Blocks:
 
Reported: 2021-11-02 07:34 UTC by Andreas Fink
Modified: 2021-11-02 13:18 UTC (History)
0 users

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 Andreas Fink 2021-11-02 07:34:41 UTC
I have emerged dev-python/mypy-0.910 but do not have dev-python/toml installed. After successful installation (i.e. emerge successfully merged the package) I am running the command `mypy --version` and get the following output:
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.9/mypy", line 33, in <module>
    sys.exit(load_entry_point('mypy==0.910', 'console_scripts', 'mypy')())
  File "/usr/lib/python-exec/python3.9/mypy", 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/mypy/__main__.py", line 6, in <module>
    from mypy.main import main
  File "/usr/lib/python3.9/site-packages/mypy/main.py", line 13, in <module>
    from mypy import build
  File "/usr/lib/python3.9/site-packages/mypy/build.py", line 59, in <module>
    from mypy.config_parser import parse_mypy_comments
  File "/usr/lib/python3.9/site-packages/mypy/config_parser.py", line 10, in <module>
    import toml
ModuleNotFoundError: No module named 'toml'

When I manually merge dev-python/toml the output is as expected.

Reproducible: Always

Steps to Reproduce:
1. Emerge dev-python/mypy
2. Make sure dev-python/toml is not installed by another dependency
3. Run mypy --version and watch it fail
Comment 1 Larry the Git Cow gentoo-dev 2021-11-02 13:18:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d315e3960e7fab3ede04272b61049c8209fc34c

commit 3d315e3960e7fab3ede04272b61049c8209fc34c
Author:     Arthur Zamarin <arthurzam@gentoo.org>
AuthorDate: 2021-11-02 13:16:08 +0000
Commit:     Arthur Zamarin <arthurzam@gentoo.org>
CommitDate: 2021-11-02 13:17:52 +0000

    dev-python/mypy: add rdep on dev-python/toml
    
    toml is used by mypy during runtime (for example in file
    mypy/config_parser.py).
    
    Please note that it was replaced with tomli, relevant to next
    version bump.
    
    Closes: https://bugs.gentoo.org/821274
    Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>

 dev-python/mypy/{mypy-0.910.ebuild => mypy-0.910-r1.ebuild} | 3 +++
 1 file changed, 3 insertions(+)