# HG changeset patch # User Laurent Peuch # Date 1555028788 -7200 # Node ID 933c2b3839ab481461d173e020c81098f208913c # Parent 6eba53763482ab9507013453ce8507f4b28418b2 [cubicweb-ctl] remove "cubicweb-ctl wsgi" command following pyramid standardization diff -r 6eba53763482 -r 933c2b3839ab cubicweb/cwctl.py --- a/cubicweb/cwctl.py Fri Apr 12 12:31:14 2019 +0200 +++ b/cubicweb/cwctl.py Fri Apr 12 02:26:28 2019 +0200 @@ -774,75 +774,6 @@ appcfg.save() -# WSGI ######### - -WSGI_CHOICES = {} -try: - from cubicweb.wsgi import server as stdlib_server -except ImportError: - pass -else: - WSGI_CHOICES['stdlib'] = stdlib_server -try: - from cubicweb.wsgi import wz -except ImportError: - pass -else: - WSGI_CHOICES['werkzeug'] = wz -try: - from cubicweb.wsgi import tnd -except ImportError: - pass -else: - WSGI_CHOICES['tornado'] = tnd - - -def wsgichoices(): - return tuple(WSGI_CHOICES) - - -if WSGI_CHOICES: - class WSGIStartHandler(InstanceCommand): - """Start an interactive wsgi server """ - name = 'wsgi' - actionverb = 'started' - arguments = '' - - @property - def options(self): - return ( - ("debug", - {'short': 'D', 'action': 'store_true', - 'default': False, - 'help': 'start server in debug mode.'}), - ('method', - {'short': 'm', - 'type': 'choice', - 'metavar': '', - 'default': 'stdlib', - 'choices': wsgichoices(), - 'help': 'wsgi utility/method'}), - ('loglevel', - {'short': 'l', - 'type': 'choice', - 'metavar': '', - 'default': None, - 'choices': ('debug', 'info', 'warning', 'error'), - 'help': 'debug if -D is set, error otherwise', - }), - ) - - def wsgi_instance(self, appid): - config = cwcfg.config_for(appid, debugmode=self['debug']) - init_cmdline_log_threshold(config, self['loglevel']) - assert config.name == 'all-in-one' - meth = self['method'] - server = WSGI_CHOICES[meth] - return server.run(config) - - CWCTL.register(WSGIStartHandler) - - for cmdcls in (ListCommand, CreateInstanceCommand, DeleteInstanceCommand, UpgradeInstanceCommand, diff -r 6eba53763482 -r 933c2b3839ab doc/changes/3.27.rst --- a/doc/changes/3.27.rst Fri Apr 12 12:31:14 2019 +0200 +++ b/doc/changes/3.27.rst Fri Apr 12 02:26:28 2019 +0200 @@ -16,11 +16,16 @@ Backwards incompatible changes ------------------------------ -* ``cubicweb-ctl`` commands "start", "stop", "restart", "reload" and "status" - have been removed because they relied on the Twisted web server backend that - is no longer maintained nor working with Python 3. +* Standardization on the way to launch a cubicweb instance, from now on the + only way to do that will be the used the ``pyramid`` command. Therefore: -* Twisted web server support has been removed. + * ``cubicweb-ctl`` commands "start", "stop", "restart", "reload" and "status" + have been removed because they relied on the Twisted web server backend that + is no longer maintained nor working with Python 3. + + * Twisted web server support has been removed. + + * ``cubicweb-ctl wsgi`` has also been removed. * Support for legacy cubes (in the 'cubes' python namespace) has been dropped. Use of environment variables CW_CUBES_PATH and CUBES_DIR is removed.