remove "twisted" configuration (closes #2919310)
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Fri, 12 Jul 2013 10:51:35 +0200
changeset 9251 e4d753c8b1c4
parent 9250 0dcc68dd8458
child 9252 01bca75ee8bd
remove "twisted" configuration (closes #2919310) This was also known as "web only" instances. Not used in production anywhere today.
cwconfig.py
cwctl.py
etwist/twconfig.py
test/data/migration/0.1.0_web.py
test/unittest_migration.py
--- a/cwconfig.py	Fri Oct 04 14:28:50 2013 +0200
+++ b/cwconfig.py	Fri Jul 12 10:51:35 2013 +0200
@@ -206,7 +206,7 @@
     """return a list of installed configurations in a directory
     according to \*-ctl files
     """
-    return [name for name in ('repository', 'twisted', 'all-in-one')
+    return [name for name in ('repository', 'all-in-one')
             if exists(join(directory, '%s.conf' % name))]
 
 def guess_configuration(directory):
@@ -940,10 +940,9 @@
                                      ' "cubicweb-ctl list")' % appid)
         return home
 
-    MODES = ('common', 'repository', 'Any', 'web')
+    MODES = ('common', 'repository', 'Any')
     MCOMPAT = {'all-in-one': MODES,
-               'repository': ('common', 'repository', 'Any'),
-               'twisted'   : ('common', 'web'),}
+               'repository': ('common', 'repository', 'Any')}
     @classmethod
     def accept_mode(cls, mode):
         #assert mode in cls.MODES, mode
--- a/cwctl.py	Fri Oct 04 14:28:50 2013 +0200
+++ b/cwctl.py	Fri Jul 12 10:51:35 2013 +0200
@@ -357,7 +357,7 @@
           }),
         ('config',
          {'short': 'c', 'type' : 'choice', 'metavar': '<install type>',
-          'choices': ('all-in-one', 'repository', 'twisted'),
+          'choices': ('all-in-one', 'repository'),
           'default': 'all-in-one',
           'help': 'installation type, telling which part of an instance '
           'should be installed. You can list available configurations using the'
--- a/etwist/twconfig.py	Fri Oct 04 14:28:50 2013 +0200
+++ b/etwist/twconfig.py	Fri Jul 12 10:51:35 2013 +0200
@@ -36,7 +36,6 @@
 
 class TwistedConfiguration(WebConfiguration):
     """web instance (in a twisted web server) client of a RQL server"""
-    name = 'twisted'
 
     options = merge_options((
         # ctl configuration
@@ -107,8 +106,6 @@
         return 'http://%s:%s/' % (self['host'] or getfqdn(), self['port'] or 8080)
 
 
-CONFIGURATIONS.append(TwistedConfiguration)
-
 try:
     from cubicweb.server.serverconfig import ServerConfiguration
 
--- a/test/data/migration/0.1.0_web.py	Fri Oct 04 14:28:50 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
-# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
-#
-# This file is part of CubicWeb.
-#
-# CubicWeb is free software: you can redistribute it and/or modify it under the
-# terms of the GNU Lesser General Public License as published by the Free
-# Software Foundation, either version 2.1 of the License, or (at your option)
-# any later version.
-#
-# CubicWeb is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Lesser General Public License along
-# with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-"""web only
-
-"""
--- a/test/unittest_migration.py	Fri Oct 04 14:28:50 2013 +0200
+++ b/test/unittest_migration.py	Fri Jul 12 10:51:35 2013 +0200
@@ -79,10 +79,6 @@
         self.assert_(not isinstance(config.migration_handler(), ServerMigrationHelper))
         self.assertIsInstance(config.migration_handler(), MigrationHelper)
         config = self.config
-        config.__class__.name = 'twisted'
-        self.assertListEqual(filter_scripts(config, TMIGRDIR, (0,0,4), (0,1,0)),
-                              [((0, 1 ,0), TMIGRDIR+'0.1.0_common.py'),
-                               ((0, 1 ,0), TMIGRDIR+'0.1.0_web.py')])
         config.__class__.name = 'repository'
         self.assertListEqual(filter_scripts(config, TMIGRDIR, (0,0,4), (0,1,0)),
                               [((0, 1 ,0), TMIGRDIR+'0.1.0_Any.py'),
@@ -92,8 +88,7 @@
         self.assertListEqual(filter_scripts(config, TMIGRDIR, (0,0,4), (0,1,0)),
                               [((0, 1 ,0), TMIGRDIR+'0.1.0_Any.py'),
                                ((0, 1 ,0), TMIGRDIR+'0.1.0_common.py'),
-                               ((0, 1 ,0), TMIGRDIR+'0.1.0_repository.py'),
-                               ((0, 1 ,0), TMIGRDIR+'0.1.0_web.py')])
+                               ((0, 1 ,0), TMIGRDIR+'0.1.0_repository.py')])
         config.__class__.name = 'repository'