Skip to content
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

PickleSerializer removed from Django main #646

Closed
iurisilvio opened this issue Jan 19, 2023 · 6 comments
Closed

PickleSerializer removed from Django main #646

iurisilvio opened this issue Jan 19, 2023 · 6 comments
Labels

Comments

@iurisilvio
Copy link
Contributor

PickleSerializer was deprecated and removed from Django.

https://code.djangoproject.com/ticket/29708

Actions for Django main are broken. https://github.com/jazzband/django-redis/actions/runs/3956633560/jobs/6776067867#step:7:154

@iurisilvio iurisilvio added the bug label Jan 19, 2023
rootart pushed a commit to rootart/django-redis that referenced this issue Jan 20, 2023
@rootart
Copy link
Contributor

rootart commented Jan 20, 2023

@iurisilvio prepared PR to skip the test that uses PickleSerializer for Django > 4.2. As the django.contrib.sessions.serializers.PickleSerializer will be removed entirely it looks like we don't have to perform any other deprecation changes and only keep compatibility with the older Django versions. Let me know what you think about it.

@WisdomPill
Copy link
Member

but what will be used as default then?

@iurisilvio
Copy link
Contributor Author

Django removed the serializer, but their redis serializer still use pickle.

django/django@c6cb5a0

@iurisilvio
Copy link
Contributor Author

We use django PickleSerializer only to test sessions.

https://docs.djangoproject.com/en/4.1/topics/http/sessions/#session-serialization

Django changed sessions to work with a json serializer and it is their default now. I'm not sure if in the past the default was pickle.

with override_settings(

Looks like our test is based on Django test for it and they changed it some time ago. django/django@4368627

I think we should just update the test.

@iurisilvio
Copy link
Contributor Author

Pickle was necessary to serialize session expiration, but now Django save it as string.

WisdomPill added a commit that referenced this issue Jan 22, 2023
#646, fix skip tests for the django.contrib.sessions.serializers.Pick…
@WisdomPill
Copy link
Member

Fixed in #647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants