[cubicweb-ctl] remove "cubicweb-ctl wsgi" command following pyramid standardization
authorLaurent Peuch <cortex@worlddomination.be>
Fri, 12 Apr 2019 02:26:28 +0200
changeset 12585 933c2b3839ab
parent 12584 6eba53763482
child 12587 6b08ba99b40e
[cubicweb-ctl] remove "cubicweb-ctl wsgi" command following pyramid standardization
cubicweb/cwctl.py
doc/changes/3.27.rst
--- 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 = '<instance>'
-
-        @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': '<method>',
-                  'default': 'stdlib',
-                  'choices': wsgichoices(),
-                  'help': 'wsgi utility/method'}),
-                ('loglevel',
-                 {'short': 'l',
-                  'type': 'choice',
-                  'metavar': '<log level>',
-                  '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,
--- 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.