This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: `test_field_descriptor` in `test_collections` should test all pickle protocols
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: rhettinger, sobolevn
Priority: normal Keywords: patch

Created on 2022-01-15 10:22 by sobolevn, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30614 merged sobolevn, 2022-01-15 10:23
Messages (3)
msg410638 - (view) Author: Nikita Sobolev (sobolevn) * (Python triager) Date: 2022-01-15 10:22
Right now this test does not test all pickle protocols: https://github.com/python/cpython/blob/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5/Lib/test/test_collections.py#L680-L682

But, I guess that it should, like all other tests do.
PR is on its way.
msg410671 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2022-01-16 04:33
New changeset 37eab55ac9da6b6361f136a1da15bfcef12ed954 by Nikita Sobolev in branch 'main':
bpo-46387: test all pickle protos in `test_field_descriptor` in `test_collections` (GH-30614)
https://github.com/python/cpython/commit/37eab55ac9da6b6361f136a1da15bfcef12ed954
msg410672 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2022-01-16 04:37
I approved this but the code wasn't wrong.  Once an object has demonstrated that it can pickle at all, it is the testing responsibility of the pickle module tests to make sure that new protocols handle the same inputs as the old ones.

I went ahead and applied the PR because it is harmless, but it is a gratuitous test, so I don't recommend sweeping through all other pickling tests and modifying them in the same way.
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90545
2022-01-16 04:37:02rhettingersetstatus: open -> closed
messages: + msg410672

assignee: rhettinger
resolution: fixed
stage: patch review -> resolved
2022-01-16 04:33:38rhettingersetmessages: + msg410671
2022-01-15 10:23:51sobolevnsetkeywords: + patch
stage: patch review
pull_requests: + pull_request28817
2022-01-15 10:23:38AlexWaygoodsetnosy: + rhettinger
2022-01-15 10:22:39sobolevncreate