changeset 6886:535c397ee90d

ini: drop disabled conditional sections in shipped ini files - if people need them, they can use make-config again
author Mads Kiilerich <mads@kiilerich.com>
date Thu, 14 Sep 2017 02:08:06 +0200
parents d22eb3c1797b
children d7222b590156
files development.ini kallithea/lib/inifile.py kallithea/tests/test.ini
diffstat 3 files changed, 1 insertions(+), 188 deletions(-) [+]
line wrap: on
line diff
--- a/development.ini	Thu Sep 14 02:08:06 2017 +0200
+++ b/development.ini	Thu Sep 14 02:08:06 2017 +0200
@@ -66,18 +66,6 @@
 #smtp_use_tls = false
 
 [server:main]
-## Gearbox default web server ##
-#use = egg:gearbox#wsgiref
-## nr of worker threads to spawn
-#threadpool_workers = 1
-## max request before thread respawn
-#threadpool_max_requests = 100
-## option to use threads of process
-#use_threadpool = true
-
-## Gearbox gevent web server ##
-#use = egg:gearbox#gevent
-
 ## WAITRESS ##
 use = egg:waitress#main
 ## number of worker threads
@@ -88,81 +76,6 @@
 ## windows systems.
 #asyncore_use_poll = True
 
-## GUNICORN ##
-#use = egg:gunicorn#main
-## number of process workers. You must set `instance_id = *` when this option
-## is set to more than one worker
-#workers = 1
-## process name
-#proc_name = kallithea
-## type of worker class, one of sync, eventlet, gevent, tornado
-## recommended for bigger setup is using of of other than sync one
-#worker_class = sync
-#max_requests = 1000
-## amount of time a worker can handle request before it gets killed and
-## restarted
-#timeout = 3600
-
-## UWSGI ##
-## run with uwsgi --ini-paste-logged <inifile.ini>
-#[uwsgi]
-#socket = /tmp/uwsgi.sock
-#master = true
-#http = 127.0.0.1:5000
-
-## set as deamon and redirect all output to file
-#daemonize = ./uwsgi_kallithea.log
-
-## master process PID
-#pidfile = ./uwsgi_kallithea.pid
-
-## stats server with workers statistics, use uwsgitop
-## for monitoring, `uwsgitop 127.0.0.1:1717`
-#stats = 127.0.0.1:1717
-#memory-report = true
-
-## log 5XX errors
-#log-5xx = true
-
-## Set the socket listen queue size.
-#listen = 256
-
-## Gracefully Reload workers after the specified amount of managed requests
-## (avoid memory leaks).
-#max-requests = 1000
-
-## enable large buffers
-#buffer-size = 65535
-
-## socket and http timeouts ##
-#http-timeout = 3600
-#socket-timeout = 3600
-
-## Log requests slower than the specified number of milliseconds.
-#log-slow = 10
-
-## Exit if no app can be loaded.
-#need-app = true
-
-## Set lazy mode (load apps in workers instead of master).
-#lazy = true
-
-## scaling ##
-## set cheaper algorithm to use, if not set default will be used
-#cheaper-algo = spare
-
-## minimum number of workers to keep at all times
-#cheaper = 1
-
-## number of workers to spawn at startup
-#cheaper-initial = 1
-
-## maximum number of workers that can be spawned
-#workers = 4
-
-## how many workers should be spawned at a time
-#cheaper-step = 1
-
 ## COMMON ##
 #host = 127.0.0.1
 host = 0.0.0.0
@@ -499,12 +412,6 @@
 # SQLITE [default]
 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
 
-# POSTGRESQL
-#sqlalchemy.url = postgresql://user:pass@localhost/kallithea
-
-# MySQL
-#sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
-
 # see sqlalchemy docs for others
 
 sqlalchemy.pool_recycle = 3600
--- a/kallithea/lib/inifile.py	Thu Sep 14 02:08:06 2017 +0200
+++ b/kallithea/lib/inifile.py	Thu Sep 14 02:08:06 2017 +0200
@@ -69,7 +69,6 @@
     [second-section]
     # Description                                                                  #
     # of this config file                                                          #
-    #some_variable = "never mind - option-b will not be used anyway ..."
     <BLANKLINE>
     """
     # select the right mako conditionals for the other less sophisticated formats
@@ -84,7 +83,7 @@
             """
             criteria, lines = m.groups()
             if criteria not in selected_mako_conditionals:
-                lines = '\n'.join((l if not l or l.startswith('#') else '#' + l) for l in lines.split('\n'))
+                lines = ''
             return lines
         conditional_lines = re.sub(r'^%(?:el)?if (.*):\n((?:^[^%\n].*\n|\n)*)',
             sub_conditional, conditional_lines, flags=re.MULTILINE)
--- a/kallithea/tests/test.ini	Thu Sep 14 02:08:06 2017 +0200
+++ b/kallithea/tests/test.ini	Thu Sep 14 02:08:06 2017 +0200
@@ -63,18 +63,6 @@
 #smtp_use_tls = false
 
 [server:main]
-## Gearbox default web server ##
-#use = egg:gearbox#wsgiref
-## nr of worker threads to spawn
-#threadpool_workers = 1
-## max request before thread respawn
-#threadpool_max_requests = 100
-## option to use threads of process
-#use_threadpool = true
-
-## Gearbox gevent web server ##
-#use = egg:gearbox#gevent
-
 ## WAITRESS ##
 use = egg:waitress#main
 ## number of worker threads
@@ -85,81 +73,6 @@
 ## windows systems.
 #asyncore_use_poll = True
 
-## GUNICORN ##
-#use = egg:gunicorn#main
-## number of process workers. You must set `instance_id = *` when this option
-## is set to more than one worker
-#workers = 1
-## process name
-#proc_name = kallithea
-## type of worker class, one of sync, eventlet, gevent, tornado
-## recommended for bigger setup is using of of other than sync one
-#worker_class = sync
-#max_requests = 1000
-## amount of time a worker can handle request before it gets killed and
-## restarted
-#timeout = 3600
-
-## UWSGI ##
-## run with uwsgi --ini-paste-logged <inifile.ini>
-#[uwsgi]
-#socket = /tmp/uwsgi.sock
-#master = true
-#http = 127.0.0.1:5000
-
-## set as deamon and redirect all output to file
-#daemonize = ./uwsgi_kallithea.log
-
-## master process PID
-#pidfile = ./uwsgi_kallithea.pid
-
-## stats server with workers statistics, use uwsgitop
-## for monitoring, `uwsgitop 127.0.0.1:1717`
-#stats = 127.0.0.1:1717
-#memory-report = true
-
-## log 5XX errors
-#log-5xx = true
-
-## Set the socket listen queue size.
-#listen = 256
-
-## Gracefully Reload workers after the specified amount of managed requests
-## (avoid memory leaks).
-#max-requests = 1000
-
-## enable large buffers
-#buffer-size = 65535
-
-## socket and http timeouts ##
-#http-timeout = 3600
-#socket-timeout = 3600
-
-## Log requests slower than the specified number of milliseconds.
-#log-slow = 10
-
-## Exit if no app can be loaded.
-#need-app = true
-
-## Set lazy mode (load apps in workers instead of master).
-#lazy = true
-
-## scaling ##
-## set cheaper algorithm to use, if not set default will be used
-#cheaper-algo = spare
-
-## minimum number of workers to keep at all times
-#cheaper = 1
-
-## number of workers to spawn at startup
-#cheaper-initial = 1
-
-## maximum number of workers that can be spawned
-#workers = 4
-
-## how many workers should be spawned at a time
-#cheaper-step = 1
-
 ## COMMON ##
 host = 127.0.0.1
 #port = 5000
@@ -496,12 +409,6 @@
 # SQLITE [default]
 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
 
-# POSTGRESQL
-#sqlalchemy.url = postgresql://user:pass@localhost/kallithea
-
-# MySQL
-#sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
-
 # see sqlalchemy docs for others
 
 sqlalchemy.pool_recycle = 3600