-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate pickleable sessions, recommend json #3353
deprecate pickleable sessions, recommend json #3353
Conversation
3661a67
to
c4f30bd
Compare
c4f30bd
to
c318834
Compare
👍 |
I like the example 'pickle fallback' code, but i think it would make sense for the docs to list some of the common objects that not JSON serializable (namely Datetime) and show an example JSON encoder/decoder using object_hooks to enable it. I imagine this would pre-empt many questions, and serve as a resource to point people having trouble to. The renderers documentation (https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/renderers.html) does something similar, however it uses the standard serializer and |
I'm not interested in doing this. Feel free to submit a PR and I'll evaluate it but I have no intentions of supporting this type of stuff in the default json serializer on my own. |
@jvanasco your PR may be useful as a recipe in the Pyramid Community Cookbook, if not in Pyramid's docs, or you could blog about it, and Pyramid docs could have a link to it. |
ok, i'll generate a PR for some docs once this ticket closes out. I don't think the default serializer should handle |
This change is backward-compatible but emits deprecation warnings when using the default
PickleSerializer
withSignedCookieSessionFactory
.I was also going to deprecate it in
UnencryptedCookieSessionFactoryConfig
but that entire thing has been deprecated since 1.5 and is definitely getting removed in 2.0 wholesale, so there's no point in deprecating a small part of it.replaces #3341
related #2709