test_peg_generator fails when using -Werror: dep_util is Deprecated · Issue #132921 · python/cpython · GitHub
Skip to content

test_peg_generator fails when using -Werror: dep_util is Deprecated #132921

Description

@vstinner

Example: https://buildbot.python.org/#/builders/146/builds/11260

ERROR: test_advanced_left_recursive (test.test_peg_generator.test_c_parser.TestCParser.test_advanced_left_recursive)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/main/Lib/test/test_peg_generator/test_c_parser.py", line 255, in test_advanced_left_recursive
    self.run_test(grammar_source, test_source)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/test/test_peg_generator/test_c_parser.py", line 134, in run_test
    self.build_extension(grammar_source)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Lib/test/test_peg_generator/test_c_parser.py", line 131, in build_extension
    generate_parser_c_extension(grammar, Path('.'), library_dir=self.library_dir)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vstinner/python/main/Tools/peg_generator/pegen/testutil.py", line 107, in generate_parser_c_extension
    compile_c_extension(
    ~~~~~~~~~~~~~~~~~~~^
        str(source),
        ^^^^^^^^^^^^
    ...<3 lines>...
        library_dir=library_dir,
        ^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/vstinner/python/main/Tools/peg_generator/pegen/build.py", line 98, in compile_c_extension
    from setuptools._distutils.dep_util import newer_group
  File "/home/vstinner/python/main/build/test_python_worker_615517æ/tempcwd/venv/lib/python3.14t/site-packages/setuptools/_distutils/dep_util.py", line 9, in __getattr__
    warnings.warn(
    ~~~~~~~~~~~~~^
        "dep_util is Deprecated. Use functions from setuptools instead.",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        DeprecationWarning,
        ^^^^^^^^^^^^^^^^^^^
        stacklevel=2,
        ^^^^^^^^^^^^^
    )
    ^
DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.

Linked PRs

Activity

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

    testsTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions