Skip to content

imports of distutils pick up wrong parent module #12490

@jaraco

Description

@jaraco

In pypa/distutils#259, I'm tracking down an emergent regression in the import logic that breaks the test suite on pytest 8.1 and 8.2.

It looks like it's successfully discovering distutils/cygwincompiler.py, but then when a relative import from there imports .version, it's getting $prefix/lib/distutils/version.py.

I haven't yet root caused it, and it may be related to #12044 or other open issues.

I'll continue to investigate until I have a better reproducer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions