Skip to content

feat: provide a default session when none is registered

We add a new file whose purpose is to set the session factory to the one provided in pyramid. This file will be included by default when using the generated pyramid.ini but could be edited to use another session system.

Original description by @bram (before implemetation change):

Honestly I'm not very convinced by this MR by pyramid is ESPECIALLY annoying with all it's generic interface abstraction at allowing you to detect when something is there and not there and when it's committed (and then query able) or not.

So that's the best way I've managed to find but urgh.

The session is based on pyramid default tutorial https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/sessions.html

An alternative would be to add pyramid_nacl_session as a dependency and use it but it's yet another new dependency (but it's an official one from pyramid) https://docs.pylonsproject.org/projects/pyramid-nacl-session/en/latest/index.html

Edited by Frank Bessou

Merge request reports