GNS3 / gns3-server

GNS3 server
GNU General Public License v3.0
766 stars 258 forks source link

prompt_toolkit 2 #1424

Open carlwgeorge opened 5 years ago

carlwgeorge commented 5 years ago

Originally I was just subscribing to the pyup-bot issues about this, but I'm tired of resubscribing when they get closed. I'm opening this issue instead so it's persistent until it actually gets resolved.

gns3-server requires prompt-toolkit 1.0.15. That library has a new major version (2) that is backwards incompatible. I package prompt_toolkit for Fedora, and I've updated it to version 2 because other applications need it. Please port gns3-server to prompt_toolkit 2.

https://python-prompt-toolkit.readthedocs.io/en/stable/pages/upgrading.html

PhilipSchmid commented 5 years ago

Hi there,

Any updates on this? Currently I'm not able to run gns3-server (version2.1.11-r0, pkgs.alpinelinux.org) on Linux Alpine (version edge) since the following error occurs when I start the gns3-server (command gns3server -A --config /opt/data/gns3_server.conf).

Linux Alpine Edge only offers prompt-toolkit version 2.0.7.

Log:

gns3_1  | Traceback (most recent call last):
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master
gns3_1  |     ws.require(__requires__)
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require
gns3_1  |     needed = self.resolve(parse_requirements(requirements))
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 789, in resolve
gns3_1  |     raise VersionConflict(dist, req).with_context(dependent_req)
gns3_1  | pkg_resources.ContextualVersionConflict: (prompt-toolkit 2.0.7 (/usr/lib/python3.6/site-packages), Requirement.parse('prompt-toolkit==1.0.15'), {'gns3-server'})
gns3_1  | 
gns3_1  | During handling of the above exception, another exception occurred:
gns3_1  | 
gns3_1  | Traceback (most recent call last):
gns3_1  |   File "/usr/bin/gns3server", line 6, in <module>
gns3_1  |     from pkg_resources import load_entry_point
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module>
gns3_1  |     @_call_aside
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
gns3_1  |     f(*args, **kwargs)
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
gns3_1  |     working_set = WorkingSet._build_master()
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
gns3_1  |     return cls._build_from_requirements(__requires__)
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
gns3_1  |     dists = ws.resolve(reqs, Environment())
gns3_1  |   File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve
gns3_1  |     raise DistributionNotFound(req, requirers)
gns3_1  | pkg_resources.DistributionNotFound: The 'prompt-toolkit==1.0.15' distribution was not found and is required by gns3-server
gns3_server_gns3_1 exited with code 1

Thanks!

Regards, Philip

grossmj commented 5 years ago

I removed the prompt_toolkit dependency in version 2.2 (this is only useful for the (limited) embedded shell for the simple Ethernet switch provided by GNS3). We will try to support prompt_toolkit 2 and re-enable that embedded shell in version 2.3

vladimirovgeorgij commented 5 years ago

Can you build a new release of gns3-server with number like 2.1.15-2? I use Arch Linux and today works fine only ipython or only gns3-server, because gns3-server requieres prompt_toolbox==1.0.15

carlwgeorge commented 5 years ago

@vladimirovgeorgij Like Fedora, Arch has moved on to prompt_toolkit 2. Arch doesn't package gns3-server, but it is in the AUR. The AUR package requires python-prompt_toolkit-gns3, which appears to be a fork of python-prompt_toolkit that is staying on version 1 for gns3-server's needs. Rebuild your AUR packages and it should work. There is nothing for upstream to do.