classification
Title: test_importlib uses deprecated SelectableGroups interface
Type: Stage: resolved
Components: Tests Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: iritkatriel, jaraco, miss-islington
Priority: normal Keywords: patch

Created on 2021-07-30 18:19 by iritkatriel, last changed 2021-08-01 03:01 by jaraco. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27508 merged jaraco, 2021-07-31 12:47
PR 27510 merged miss-islington, 2021-07-31 13:08
Messages (6)
msg398598 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-07-30 18:19
% ./python.exe -E -We -m test -v test_importlib

....

======================================================================
ERROR: test_entry_points_groups_get (test.test_importlib.test_metadata_api.APITests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython-1/Lib/test/test_importlib/test_metadata_api.py", line 165, in test_entry_points_groups_get
    entry_points().get('missing', 'default') == 'default'
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/iritkatriel/src/cpython-1/Lib/importlib/metadata/__init__.py", line 400, in get
    self._warn()
    ^^^^^^^^^^^^
DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.

======================================================================
ERROR: test_entry_points_groups_getitem (test.test_importlib.test_metadata_api.APITests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/iritkatriel/src/cpython-1/Lib/test/test_importlib/test_metadata_api.py", line 155, in test_entry_points_groups_getitem
    entry_points()['entries'] == entry_points(group='entries')
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/Users/iritkatriel/src/cpython-1/Lib/importlib/metadata/__init__.py", line 396, in __getitem__
    self._warn()
    ^^^^^^^^^^^^
DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.

----------------------------------------------------------------------
msg398624 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-31 03:11
In addition to the two reported, there are two others:

- test_entry_points_dict_construction
- test_entry_points_by_index

that also fail. I've been able to replicate the issue in importlib_metadata, so I'll fix it there first.
msg398625 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-31 03:12
All four of those tests had used `capture_warnings` in an attempt to capture them, but it did not alter the warnings filter.
msg398626 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-07-31 03:14
Patch at https://github.com/python/importlib_metadata/pull/333.
msg398639 - (view) Author: miss-islington (miss-islington) Date: 2021-07-31 13:08
New changeset 1cf8424a62db38a041d421a46618e025bbb87f89 by Jason R. Coombs in branch 'main':
bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508)
https://github.com/python/cpython/commit/1cf8424a62db38a041d421a46618e025bbb87f89
msg398678 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2021-08-01 03:01
New changeset 21d5897982698a461215203ab51f56ad05648001 by Miss Islington (bot) in branch '3.10':
bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508) (#27510)
https://github.com/python/cpython/commit/21d5897982698a461215203ab51f56ad05648001
History
Date User Action Args
2021-08-01 03:01:58jaracosetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-08-01 03:01:42jaracosetmessages: + msg398678
2021-07-31 13:08:23miss-islingtonsetpull_requests: + pull_request26024
2021-07-31 13:08:21miss-islingtonsetnosy: + miss-islington
messages: + msg398639
2021-07-31 12:47:20jaracosetkeywords: + patch
stage: patch review
pull_requests: + pull_request26022
2021-07-31 03:14:44jaracosetmessages: + msg398626
2021-07-31 03:12:44jaracosetmessages: + msg398625
2021-07-31 03:11:42jaracosetmessages: + msg398624
2021-07-31 01:23:16xtreaksetnosy: + jaraco
2021-07-30 18:24:56iritkatrielsetversions: + Python 3.11
2021-07-30 18:19:48iritkatrielcreate