New submission from Serhiy Storchaka <storchaka+cpyt...@gmail.com>:

The default pickle protocol is 4 now. But shelve still uses the pickle protocol 
3. Shouldn't it be bumped? Shouldn't shelve use pickle.DEFAULT_PROTOCOL by 
default?

Disadvantages:

1. This will make shelve files incompatible with Python 3.3 by default.

2. Protocol 4 adds 9 bytes of overhead in comparison with protocol 3. This can 
be too large for the shelve containing a lot of small objects. Maybe strip 
redundant frame header for small pickles?

----------
components: Library (Lib)
messages: 322281
nosy: alexandre.vassalotti, lukasz.langa, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Bump the default pickle protocol in shelve
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34204>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to