Mercurial > kallithea
changeset 7738:bbf7be28a11e
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 ...
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Fri, 07 Jun 2019 03:37:07 +0200 |
parents | cbdc0c3a5406 |
children | 42c4ffb45fe0 |
files | development.ini kallithea/lib/paster_commands/template.ini.mako kallithea/tests/conftest.py scripts/generate-ini.py |
diffstat | 4 files changed, 25 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- 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 = <key_for_encryption> -#beaker.session.validate_key = <validation_key> +#session.encrypt_key = <key_for_encryption> +#session.validate_key = <validation_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 ##
--- 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> <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up.</%text> -beaker.session.key = kallithea +session.key = kallithea <%text>## Sessions should always only be accessible by the browser, not directly by JavaScript.</%text> -beaker.session.httponly = true +session.httponly = true <%text>## Session lifetime. 2592000 seconds is 30 days.</%text> -beaker.session.timeout = 2592000 +session.timeout = 2592000 <%text>## Server secret used with HMAC to ensure integrity of cookies.</%text> -beaker.session.secret = ${uuid()} +session.secret = ${uuid()} <%text>## Further, encrypt the data with AES.</%text> -#beaker.session.encrypt_key = <key_for_encryption> -#beaker.session.validate_key = <validation_key> +#session.encrypt_key = <key_for_encryption> +#session.validate_key = <validation_key> <%text>## Type of storage used for the session, current types are</%text> <%text>## dbm, file, memcached, database, and memory.</%text> <%text>## File system storage of session data. (default)</%text> -#beaker.session.type = file +#session.type = file <%text>## Cookie only, store all session data inside the cookie. Requires secure secrets.</%text> -#beaker.session.type = cookie +#session.type = cookie <%text>## Database storage of session data.</%text> -#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> <%text>## ERROR HANDLING SYSTEMS ##</%text>
--- 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]': {
--- 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',