Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_importlib uses deprecated SelectableGroups interface #88947

Closed
iritkatriel opened this issue Jul 30, 2021 · 6 comments
Closed

test_importlib uses deprecated SelectableGroups interface #88947

iritkatriel opened this issue Jul 30, 2021 · 6 comments
Labels
3.11 only security fixes tests Tests in the Lib/test dir

Comments

@iritkatriel
Copy link
Member

BPO 44784
Nosy @jaraco, @miss-islington, @iritkatriel
PRs
  • bpo-44784: Apply changes from importlib_metadata 4.6.3 #27508
  • [3.10] bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508) #27510
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-08-01.03:01:58.363>
    created_at = <Date 2021-07-30.18:19:48.170>
    labels = ['tests', '3.11']
    title = 'test_importlib uses deprecated SelectableGroups interface'
    updated_at = <Date 2021-08-01.03:01:58.363>
    user = 'https://github.com/iritkatriel'

    bugs.python.org fields:

    activity = <Date 2021-08-01.03:01:58.363>
    actor = 'jaraco'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-08-01.03:01:58.363>
    closer = 'jaraco'
    components = ['Tests']
    creation = <Date 2021-07-30.18:19:48.170>
    creator = 'iritkatriel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44784
    keywords = ['patch']
    message_count = 6.0
    messages = ['398598', '398624', '398625', '398626', '398639', '398678']
    nosy_count = 3.0
    nosy_names = ['jaraco', 'miss-islington', 'iritkatriel']
    pr_nums = ['27508', '27510']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue44784'
    versions = ['Python 3.11']

    @iritkatriel
    Copy link
    Member Author

    % ./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.

    @iritkatriel iritkatriel added tests Tests in the Lib/test dir 3.11 only security fixes labels Jul 30, 2021
    @jaraco
    Copy link
    Member

    jaraco commented Jul 31, 2021

    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.

    @jaraco
    Copy link
    Member

    jaraco commented Jul 31, 2021

    All four of those tests had used capture_warnings in an attempt to capture them, but it did not alter the warnings filter.

    @jaraco
    Copy link
    Member

    jaraco commented Jul 31, 2021

    Patch at python/importlib_metadata#333.

    @miss-islington
    Copy link
    Contributor

    New changeset 1cf8424 by Jason R. Coombs in branch 'main':
    bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508)
    1cf8424

    @jaraco
    Copy link
    Member

    jaraco commented Aug 1, 2021

    New changeset 21d5897 by Miss Islington (bot) in branch '3.10':
    bpo-44784: Apply changes from importlib_metadata 4.6.3 (GH-27508) (bpo-27510)
    21d5897

    @jaraco jaraco closed this as completed Aug 1, 2021
    @jaraco jaraco closed this as completed Aug 1, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants