While working on #100817 I've noticed that slice is only tested with 3 pickle protocols. See
|
def test_pickle(self): |
|
s = slice(10, 20, 3) |
|
for protocol in (0,1,2): |
|
t = loads(dumps(s, protocol)) |
|
self.assertEqual(s, t) |
|
self.assertEqual(s.indices(15), t.indices(15)) |
|
self.assertNotEqual(id(s), id(t)) |
I don't think we need to limited supported protocols. Let's test all protocols!
Linked PRs
While working on #100817 I've noticed that
sliceis only tested with 3pickleprotocols. Seecpython/Lib/test/test_slice.py
Lines 237 to 243 in 8dd2766
Linked PRs
pickleprotocols intest_slice#100932pickleprotocols intest_slice(GH-100932). #100978pickleprotocols intest_slice(GH-100932). #100979