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_collections has a wrong test in case _itemgetter is not available
Type: Stage: resolved
Components: Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: Carl.Friedrich.Bolz, lukasz.langa, miss-islington, rhettinger
Priority: normal Keywords: patch

Created on 2021-11-21 20:46 by Carl.Friedrich.Bolz, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 29691 merged Carl.Friedrich.Bolz, 2021-11-21 20:49
PR 29708 merged miss-islington, 2021-11-22 14:45
PR 29709 merged miss-islington, 2021-11-22 14:45
PR 29710 merged miss-islington, 2021-11-22 14:47
Messages (5)
msg406738 - (view) Author: Carl Friedrich Bolz-Tereick (Carl.Friedrich.Bolz) * Date: 2021-11-21 20:46
test_field_descriptor in test_collections tries to pickle the descriptors of a namedtuple's fields, which is _collections._itemgetter on CPython. However, on PyPy that class doesn't exist. The code in collections deals fine with that fact, but the above-mentioned test does not make sense in that situation, since you can't pickle properties.

To test this behaviour, you can replace
"from _collections import _tuplegetter"
in collections/__init__.py with raise ImportError and see the test fail on CPython too.
msg406786 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-11-22 14:45
New changeset 4fad314246399b69ef0c57ba8527d9efade99069 by Carl Friedrich Bolz-Tereick in branch 'main':
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691)
https://github.com/python/cpython/commit/4fad314246399b69ef0c57ba8527d9efade99069
msg406789 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-11-22 15:06
New changeset 56b5cd52ab58d8f2f11f253ec1bb3e6000d2dbd2 by Miss Islington (bot) in branch '3.10':
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29708)
https://github.com/python/cpython/commit/56b5cd52ab58d8f2f11f253ec1bb3e6000d2dbd2
msg406791 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-11-22 16:36
New changeset 455ed45d7c30c5f2a31c524b015c48ac85f3d27c by Miss Islington (bot) in branch '3.9':
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29709)
https://github.com/python/cpython/commit/455ed45d7c30c5f2a31c524b015c48ac85f3d27c
msg408274 - (view) Author: Łukasz Langa (lukasz.langa) * (Python committer) Date: 2021-12-11 00:02
New changeset 7c5b01b5101923fc38274c491bd55239ee9f0416 by Miss Islington (bot) in branch '3.8':
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29710)
https://github.com/python/cpython/commit/7c5b01b5101923fc38274c491bd55239ee9f0416
History
Date User Action Args
2022-04-11 14:59:52adminsetgithub: 90017
2021-12-11 00:02:04lukasz.langasetnosy: + lukasz.langa
messages: + msg408274
2021-11-22 16:39:53rhettingersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-11-22 16:36:42rhettingersetmessages: + msg406791
2021-11-22 15:06:02rhettingersetmessages: + msg406789
2021-11-22 14:47:34miss-islingtonsetpull_requests: + pull_request27946
2021-11-22 14:45:19miss-islingtonsetpull_requests: + pull_request27945
2021-11-22 14:45:11miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request27944
2021-11-22 14:45:01rhettingersetmessages: + msg406786
2021-11-21 23:32:36rhettingersetassignee: rhettinger

nosy: + rhettinger
2021-11-21 20:49:13Carl.Friedrich.Bolzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request27929
2021-11-21 20:46:31Carl.Friedrich.Bolzcreate