[Django] #29550: Usages of pickling should easen protocol overriding

3 views
Skip to first unread message

Django

unread,
Jul 6, 2018, 5:49:16 PM7/6/18
to django-...@googlegroups.com
#29550: Usages of pickling should easen protocol overriding
-------------------------------------+-------------------------------------
Reporter: Simon | Owner: Simon Charette
Charette |
Type: | Status: assigned
Cleanup/optimization |
Component: | Version: master
Uncategorized |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
During the process of porting Django projects from Python versions to
newer ones a common late stage step is to turn some instances of a cluster
into canaries running the latest version. While state sharing between
canaries and the rest of the fleet should be avoided it's not always
possible to completely isolate them. For example, starting from a cold
isolated cache might be impractical at a certain scale.

This is particularly problematic when dealing with pickled data because
Django always uses the latest protocol (through the
`pickle.HIGHEST_PROTOCOL` constant) which prevent the data from being
unpickled on instances that don't have access. For example, if some data
is pickled on Python 3.4 canary where `pickle.HIGHEST_PROTOCOL == 4` it
won't be pickleable on the rest of the Python 3.3 servers sharing this
global state.

Django should make it easier to override the pickling protocol used within
methods and functions to allow users to temporarily _freeze_ the protocol
used during the transition period.

--
Ticket URL: <https://code.djangoproject.com/ticket/29550>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 6, 2018, 5:58:56 PM7/6/18
to django-...@googlegroups.com
#29550: Usages of pickling should easen protocol overriding
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

[https://github.com/django/django/pull/10144 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29550#comment:1>

Django

unread,
Jul 9, 2018, 12:10:14 PM7/9/18
to django-...@googlegroups.com
#29550: Ease overriding pickling protocol in session serialization and cache
backends

-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: assigned
Component: Core (Other) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Ready for checkin
* component: Uncategorized => Core (Other)


--
Ticket URL: <https://code.djangoproject.com/ticket/29550#comment:2>

Django

unread,
Jul 9, 2018, 12:12:37 PM7/9/18
to django-...@googlegroups.com
#29550: Ease overriding pickling protocol in session serialization and cache
backends
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Owner: Simon
Type: | Charette
Cleanup/optimization | Status: closed

Component: Core (Other) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"37835883ad55b3c4c3340eb8721b41fffe3ee0ef" 37835883]:
{{{
#!CommitTicketReference repository=""
revision="37835883ad55b3c4c3340eb8721b41fffe3ee0ef"
Fixed #29550 -- Eased overriding pickle.dumps() protocol in cache backends
and session serializer.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29550#comment:3>

Reply all
Reply to author
Forward
0 new messages