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

zopefoundation / zodbpickle / 3792090977

pending completion
3792090977

push

github

GitHub
Drop support for Python 2.7, 3.5, 3.6. (#74)

543 of 706 branches covered (76.91%)

Branch coverage included in aggregate %.

26 of 42 new or added lines in 8 files covered. (61.9%)

2 existing lines in 2 files now uncovered.

2443 of 2744 relevant lines covered (89.03%)

5.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/zodbpickle/slowpickle.py
1
'''
2
The zodbpickle.pickle module exposes the standard behavior of
3
the pickle module.
4
This is backward compatible, but has the effect that by default,
5
on Python3 you get the fast implementation, while on Python2
6
you get the slow implementation.
7

8
This module is a version that always exposes the slow implementation
9
of pickling and avoids the need to explicitly touch internals.
10
'''
11

12
'''
×
13
Note: We are intentionally using "import *" in this context.
14
The imported modules define an __all__ variable, which contains
15
all the names that it wants to export.
16
So this is a rare case where 'import *' is exactly the right thing to do.
17
'''
18

NEW
19
import zodbpickle.pickle_3 as p
×
20
# undo the replacement with fast versions
NEW
21
p.Pickler, p.Unpickler = p._Pickler, p._Unpickler
×
NEW
22
p.dump, p.dumps, p.load, p.loads = p._dump, p._dumps, p._load, p._loads
×
NEW
23
del p
×
24
# pick up all names that the module defines
NEW
25
from .pickle_3 import *
×
26
# do not share the globals with a fast version
NEW
27
del sys.modules['zodbpickle.pickle_3']
×
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

© 2025 Coveralls, Inc