# HG changeset patch # User Mads Kiilerich # Date 1559871427 -7200 # Node ID bbf7be28a11eed9ecbf95ffe883bc870703c9580 # Parent cbdc0c3a54065740fa6846afd9eb8b4c840a7a3b config: rename .ini settings to avoid beaker-session deprecation warnings Gets rid of: data/env/lib/python2.7/site-packages/tg/wsgiapp.py:68 data/env/lib/python2.7/site-packages/tg/wsgiapp.py:68: DeprecationWarning: Session options should start with session. instead of baker.session. app_wrapper = wrapper(self.wrapped_dispatch, self.config) Old .ini files will still work, but one day upstream will drop the deprecated functionality ... diff -r cbdc0c3a5406 -r bbf7be28a11e development.ini --- a/development.ini Fri Jun 07 03:37:07 2019 +0200 +++ b/development.ini Fri Jun 07 03:37:07 2019 +0200 @@ -276,32 +276,32 @@ ## Name of session cookie. Should be unique for a given host and path, even when running ## on different ports. Otherwise, cookie sessions will be shared and messed up. -beaker.session.key = kallithea +session.key = kallithea ## Sessions should always only be accessible by the browser, not directly by JavaScript. -beaker.session.httponly = true +session.httponly = true ## Session lifetime. 2592000 seconds is 30 days. -beaker.session.timeout = 2592000 +session.timeout = 2592000 ## Server secret used with HMAC to ensure integrity of cookies. -#beaker.session.secret = VERY-SECRET -beaker.session.secret = development-not-secret +#session.secret = VERY-SECRET +session.secret = development-not-secret ## Further, encrypt the data with AES. -#beaker.session.encrypt_key = -#beaker.session.validate_key = +#session.encrypt_key = +#session.validate_key = ## Type of storage used for the session, current types are ## dbm, file, memcached, database, and memory. ## File system storage of session data. (default) -#beaker.session.type = file +#session.type = file ## Cookie only, store all session data inside the cookie. Requires secure secrets. -#beaker.session.type = cookie +#session.type = cookie ## Database storage of session data. -#beaker.session.type = ext:database -#beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea -#beaker.session.table_name = db_session +#session.type = ext:database +#session.sa.url = postgresql://postgres:qwe@localhost/kallithea +#session.table_name = db_session ############################ ## ERROR HANDLING SYSTEMS ## diff -r cbdc0c3a5406 -r bbf7be28a11e kallithea/lib/paster_commands/template.ini.mako --- a/kallithea/lib/paster_commands/template.ini.mako Fri Jun 07 03:37:07 2019 +0200 +++ b/kallithea/lib/paster_commands/template.ini.mako Fri Jun 07 03:37:07 2019 +0200 @@ -373,31 +373,31 @@ <%text>## Name of session cookie. Should be unique for a given host and path, even when running <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up. -beaker.session.key = kallithea +session.key = kallithea <%text>## Sessions should always only be accessible by the browser, not directly by JavaScript. -beaker.session.httponly = true +session.httponly = true <%text>## Session lifetime. 2592000 seconds is 30 days. -beaker.session.timeout = 2592000 +session.timeout = 2592000 <%text>## Server secret used with HMAC to ensure integrity of cookies. -beaker.session.secret = ${uuid()} +session.secret = ${uuid()} <%text>## Further, encrypt the data with AES. -#beaker.session.encrypt_key = -#beaker.session.validate_key = +#session.encrypt_key = +#session.validate_key = <%text>## Type of storage used for the session, current types are <%text>## dbm, file, memcached, database, and memory. <%text>## File system storage of session data. (default) -#beaker.session.type = file +#session.type = file <%text>## Cookie only, store all session data inside the cookie. Requires secure secrets. -#beaker.session.type = cookie +#session.type = cookie <%text>## Database storage of session data. -#beaker.session.type = ext:database -#beaker.session.sa.url = postgresql://postgres:qwe@localhost/kallithea -#beaker.session.table_name = db_session +#session.type = ext:database +#session.sa.url = postgresql://postgres:qwe@localhost/kallithea +#session.table_name = db_session <%text>############################ <%text>## ERROR HANDLING SYSTEMS ## diff -r cbdc0c3a5406 -r bbf7be28a11e kallithea/tests/conftest.py --- a/kallithea/tests/conftest.py Fri Jun 07 03:37:07 2019 +0200 +++ b/kallithea/tests/conftest.py Fri Jun 07 03:37:07 2019 +0200 @@ -45,7 +45,7 @@ 'app_instance_uuid': 'test', 'show_revision_number': 'true', 'beaker.cache.sql_cache_short.expire': '1', - 'beaker.session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}', + 'session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}', #'i18n.lang': '', }, '[handler_console]': { diff -r cbdc0c3a5406 -r bbf7be28a11e scripts/generate-ini.py --- a/scripts/generate-ini.py Fri Jun 07 03:37:07 2019 +0200 +++ b/scripts/generate-ini.py Fri Jun 07 03:37:07 2019 +0200 @@ -17,7 +17,7 @@ '[app:main]': { 'debug': 'true', 'app_instance_uuid': 'development-not-secret', - 'beaker.session.secret': 'development-not-secret', + 'session.secret': 'development-not-secret', }, '[handler_console]': { 'formatter': 'color_formatter',