Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 755899 - net-misc/gns3-server-2.2.11 fails to start with =dev-python/multidict-5.0.0
Summary: net-misc/gns3-server-2.2.11 fails to start with =dev-python/multidict-5.0.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Michael Mair-Keimberger (mm1ke)
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-11-21 02:06 UTC by inasprecali
Modified: 2021-01-16 08:05 UTC (History)
4 users (show)

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


Attachments
Output of emerge --log net-misc/gns3-server (gns3-server.txt,18.99 KB, text/plain)
2020-11-21 02:06 UTC, inasprecali
Details
emerge --info output (emerge-info.txt,6.15 KB, text/plain)
2020-12-01 07:29 UTC, needle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description inasprecali 2020-11-21 02:06:52 UTC
Created attachment 673984 [details]
Output of emerge --log net-misc/gns3-server

When starting gns3server, it fails with the following output:

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 567, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 884, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 775, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (multidict 5.0.0 (/usr/lib/python3.8/site-packages), Requirement.parse('multidict<5.0,>=4.5'), {'aiohttp'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.8/gns3server", line 33, in <module>
    sys.exit(load_entry_point('gns3-server==2.2.11', 'console_scripts', 'gns3server')())
  File "/usr/lib/python-exec/python3.8/gns3server", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/gns3server/main.py", line 29, in <module>
    import gns3server.utils.get_resource
  File "/usr/lib/python3.8/site-packages/gns3server/utils/get_resource.py", line 19, in <module>
    import pkg_resources
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3239, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3222, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3251, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 569, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 582, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 770, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'multidict<5.0,>=4.5' distribution was not found and is required by aiohttp

The very last line shows that it's looking for a version of multidict strictly older than 5.0. Installing =dev-python/multidict-4.7.6 solves the problem, gns3server starts up fine.

It is possible that the dependency on ~dev-python/aiohttp-3.6.2 specifically (which needs multidict) might have something to do with it, but I'm not sure.
Comment 1 inasprecali 2020-11-27 15:20:18 UTC
As of today, versions of dev-python/multidict-5.0.0 have been removed from the main repos, making it impractical to work around this bug by installing an older version until it gets solved.
Could you please at least add them again?
Comment 2 needle 2020-12-01 07:24:42 UTC
I hit this bug as well but using python3.7.

According to upstream gns3-server depends on aiohttp, and aiohttp requiers multidict to be < 5.0.0.  Even using latest gns3-server version 2.2.16 it still uses the same aiohttp version, so version bump will not help here.

Check https://github.com/GNS3/gns3-server/blob/master/requirements.txt
Comment 3 needle 2020-12-01 07:29:06 UTC
Created attachment 675988 [details]
emerge --info output
Comment 4 Maciej Barć gentoo-dev 2020-12-05 18:18:43 UTC
I came across this bug too today (using python3.8).
Comment 5 inasprecali 2020-12-09 21:28:55 UTC
Bump.
Comment 6 Michael Mair-Keimberger (mm1ke) 2020-12-10 16:28:25 UTC
Hi,

Sorry for the late reply.
This is actually a bug in dev-python/aiohttp which has a wrong dependency on multidict (as already noted by needle). I've just added a PR which should bring back multidict-4.7.6 and fixes the dependency for aiohttp.
I've also checked the latest version of gns3 (2.2.17) but it still depends on aiohttp-3.6.2 and also doesn't work with any newer version (obviously).
After this bug is fixed I'll prepare a new PR for updating gns3 to the latest version.
Comment 7 inasprecali 2021-01-07 17:35:14 UTC
Any news on this?
Comment 8 Larry the Git Cow gentoo-dev 2021-01-16 08:05:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d5ca3d0f94426ca96bd3c500703fd9e7a14ec69

commit 5d5ca3d0f94426ca96bd3c500703fd9e7a14ec69
Author:     Michael Mair-Keimberger <m.mairkeimberger@gmail.com>
AuthorDate: 2020-12-18 14:30:20 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2021-01-16 08:03:01 +0000

    net-misc/gns3-gui: 2.2.17 version bump
    
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger@gmail.com>
    Closes: https://bugs.gentoo.org/755899
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-misc/gns3-gui/Manifest               |  1 +
 net-misc/gns3-gui/gns3-gui-2.2.17.ebuild | 42 ++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)