• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zopefoundation / ZODB / 744
75%
master: 84%

Build:
Build:
LAST BUILD BRANCH: 6.1
DEFAULT BRANCH: master
Ran 26 Aug 2017 12:32PM UTC
Jobs 4
Files 51
Run time 5min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
744

push

travis-ci

jamadden
Use a higher pickle protocol (3) for serializing objects on Python 2

Previously protocol 1 was used. This is more efficient for new-style
classes (all persistent objects are new-style), according to the docs,
at the cost of being very slightly less space efficient for old-style
classes.

In tests of a persistent object with two trivial numeric attributes,
the higher protocol was 12 bytes smaller, and serialized and
deserialized 1us faster. Introducing a reference to another new-style
class for a more realistic test made the higher protocol twice as fast
to serialize (20.5 vs 10.3us), almost half the size (215 vs 142
bytes), and it deserialized 30% faster (6.5 vs 4.6us).

On Python 2, this will now allow open ``file`` objects to be
pickled (loading the object will result in a closed file); previously
this would result in a ``TypeError`` (as does under Python 3). We had
tests that you couldn't do that with a BlobFile so I had to update it
to still make that true.

I wouldn't recommend serializing arbitrary open files under Python
2 (for one thing, they can't trivially be deserialized in Python 3),
but I didn't take any steps to prevent it either. Since this hasn't
been possible, there shouldn't be code in the wild that is trying to
do it---and it wouldn't be forward compatible with Python 3 either.

6428 of 8538 relevant lines covered (75.29%)

2.99 hits per line

Jobs
ID Job ID Ran Files Coverage
3 744.3 26 Aug 2017 12:32PM UTC 0
74.69
Travis Job 744.3
4 744.4 26 Aug 2017 12:33PM UTC 0
74.91
Travis Job 744.4
5 744.5 26 Aug 2017 12:33PM UTC 0
74.97
Travis Job 744.5
6 744.6 26 Aug 2017 12:37PM UTC 0
74.92
Travis Job 744.6
Source Files on build 744
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #744
  • 5eaf2439 on github
  • Next Build on jam-pickle-prot (#746)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc