mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Getting rid of cPickle. Mmm, feels good!
This commit is contained in:
parent
be6fe5476c
commit
99603b0c1e
22 changed files with 38 additions and 5846 deletions
|
@ -4,10 +4,6 @@ import os
|
|||
import sys
|
||||
import unittest
|
||||
import pickle
|
||||
try:
|
||||
import cPickle
|
||||
except ImportError:
|
||||
cPickle = None
|
||||
|
||||
from test.test_support import (TESTFN, unlink, run_unittest,
|
||||
guard_warnings_filter)
|
||||
|
@ -299,9 +295,7 @@ class ExceptionTests(unittest.TestCase):
|
|||
value, expected[checkArgName]))
|
||||
|
||||
# test for pickling support
|
||||
for p in pickle, cPickle:
|
||||
if p is None:
|
||||
continue # cPickle not found -- skip it
|
||||
for p in [pickle]:
|
||||
for protocol in range(p.HIGHEST_PROTOCOL + 1):
|
||||
s = p.dumps(e, protocol)
|
||||
new = p.loads(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue