Sitelet https://github.com/python/cpython/issues/139604
Skip to content

test_peg_generator failures on some buildbots #139604

Description

@picnixz

Bug report

Bug description:

One of those PRs made the test_peg_generator tests fail (see https://buildbot.python.org/#/builders/469):

The failure seems to be setuptools being not present and I don't know why. It could be the lib64->lib symlink that is no more here or the change in importlib.resources.files. I don't have time now to investigate.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

  1. StanFromIreland commented on Oct 5, 2025

    @StanFromIreland
    Member

    It could be the lib64->lib symlink that is no more

    It seems most likely, the test creates a venv.

    Testing it here.

  2. StanFromIreland commented on Oct 5, 2025

    @StanFromIreland
    Member

    Yep, in the run (There are several other failures, but they seem to be unrelated) the failing test_peg_generator tests pass, therefore, it is a7a4855 / #133951.

  3. Cycloctane commented on Oct 5, 2025

    @Cycloctane
    Contributor

    pr #137139 does have a breaking change. I think the root cause of the failing test is here:

    with contextlib.ExitStack() as stack:
    python_exe = stack.enter_context(support.setup_venv_with_pip_setuptools("venv"))
    sitepackages = subprocess.check_output(
    [python_exe, "-c", "import sysconfig; print(sysconfig.get_path('platlib'))"],
    text=True,
    ).strip()
    stack.enter_context(import_helper.DirsOnSysPath(sitepackages))
    cls.addClassCleanup(stack.pop_all().close)

    Only platlib is added to syspath. Also adding purelib should fix the problem. I'm now testing and working on a pr for it.

  4. StanFromIreland commented on Oct 5, 2025

    @StanFromIreland
    Member

    Should this be closed as a duplicate of #133951 since it is still open?

  5. picnixz commented on Oct 5, 2025

    @picnixz
    MemberAuthor

    I wasn't sure which one was the faulty commit but now I can indeed close it as a duplicate.

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 dirtopic-parsertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions