bots-edi / bots

Bots EDI Translator
GNU General Public License v3.0
136 stars 84 forks source link

CherryPy Version >= 9.* Incompatible with bots-webserver #35

Open djfurman opened 7 years ago

djfurman commented 7 years ago

Description

In a new virtualenv configuration, using pip to install cherrypy downloads version 10.0 by default. When attempting to boot the bots-monitor ./bots-webserver.py this version of CherryPy throws a 'cannot import name wsgiserver error'

Trace

Traceback (most recent call last):
  File "~/.virtualEnvs/bots/bin/bots-webserver.py", line 2, in <module>
    from bots import webserver
  File "~/.virtualEnvs/bots/lib/python2.7/site-packages/bots/webserver.py", line 12, in <module>
    from cherrypy import wsgiserver
ImportError: cannot import name wsgiserver

Version Back

The same behavior occurs for installing cherrypy 9.0.0 with pip. While the docs currently state dependency on cherrypy==3.1.0, it has worked with higher versions for me in the past.

Work Around

By installing cherrypy==8.9.1, bots-monitor loads without issue.

woutervh commented 7 years ago

seems logical if you look at the changelog in cherrypy https://github.com/cherrypy/cherrypy/blob/master/CHANGES.rst

djfurman commented 7 years ago

Nice find @WouterVH.

I'll work on a PR later this week to get this implemented to support the latest two versions.

woutervh commented 7 years ago

also https://cherrypy.readthedocs.io/en/latest/history.html#v9-0-0 https://github.com/cherrypy/cherrypy/issues/1481 https://github.com/cherrypy/cherrypy/pull/1548/commits/929695cd3efedcb3e416b84d3369b33f1ee96f4f

djfurman commented 7 years ago

The changes are pretty significant and will require a near full rewrite of the webserver.py module. In the interest of backward compatibility should I attempt a try/except method with modular dependency, or does it make more sense to simply require a lower cherrypy version until we're ready to revamp the module?

I'd love a consensus before moving out with my PR. Thanks!

woutervh commented 7 years ago

I think fixing importerror is OK cfr https://github.com/bots-edi/bots/commit/78609f3a8b2f4b4319a219c99e962e3247e5eff8

djfurman commented 7 years ago

@WouterVH seems to work for me in testing, I'm good for letting this launch.

I'll open a PR for #31; anything else we want to slate into a patch release?