Skip to content

[easy] test_lib2to3 logs a PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+ #88010

Description

@vstinner
BPO 43844
Nosy @vstinner, @tirkarthi
PRs
  • bpo-43844: Fix PendingDeprecationWarning in test_lib2to3 #25407
  • 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-04-16.09:46:02.441>
    created_at = <Date 2021-04-14.11:38:57.758>
    labels = ['easy', 'tests', '3.10']
    title = '[easy]  test_lib2to3 logs a PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+'
    updated_at = <Date 2021-04-16.09:46:02.440>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2021-04-16.09:46:02.440>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-04-16.09:46:02.441>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2021-04-14.11:38:57.758>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43844
    keywords = ['patch', 'easy', 'newcomer friendly']
    message_count = 3.0
    messages = ['391062', '391076', '391176']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'xtreak']
    pr_nums = ['25407']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue43844'
    versions = ['Python 3.10']

    Activity

    1. vstinner commented on Apr 14, 2021

      @vstinner
      MemberAuthor

      <string>:2: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+

      $ ./python -m test -v test_lib2to3
      (...)
      test_load_grammar_from_subprocess (lib2to3.tests.test_parser.TestPgen2Caching) ... <string>:2: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
      ok
      (...)
      Tests result: SUCCESS

      Command to only re-run this test:

      ./python -Werror -m test -v test_lib2to3 -m test_load_grammar_from_subprocess

    2. changed the title [-][easy][/-] [+][easy] test_lib2to3 logs a PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+[/+] on Apr 14, 2021
    3. changed the title [-][easy][/-] [+][easy] test_lib2to3 logs a PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+[/+] on Apr 14, 2021
    4. tirkarthi commented on Apr 14, 2021

      @tirkarthi
      Member

      I fixed this in #21694 . Somehow this seems to emit warning over full test run and not in individual case :( Is there a command to reproduce this always? I ran the command but it's successful for me and doesn't show the warning.

      ./python -Werror -m test -v test_lib2to3 -m test_load_grammar_from_subprocess
      == CPython 3.10.0a7+ (heads/master:d9151cb453, Apr 13 2021, 03:10:47) [GCC 7.5.0]
      == Linux-4.15.0-99-generic-x86_64-with-glibc2.27 little-endian
      == cwd: /root/cpython/build/test_python_20462æ
      == CPU count: 1
      == encodings: locale=UTF-8, FS=utf-8
      0:00:00 load avg: 0.02 Run tests sequentially
      0:00:00 load avg: 0.02 [1/1] test_lib2to3
      test_load_grammar_from_subprocess (lib2to3.tests.test_parser.TestPgen2Caching) ... ok

      ----------------------------------------------------------------------

      Ran 1 test in 0.164s

      OK

      == Tests result: SUCCESS ==

      1 test OK.

      Total duration: 303 ms
      Tests result: SUCCESS

    5. vstinner commented on Apr 16, 2021

      @vstinner
      MemberAuthor

      New changeset 471870f by Victor Stinner in branch 'master':
      bpo-43844: Fix PendingDeprecationWarning in test_lib2to3 (GH-25407)
      471870f

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions