Skip to content

Possible unhandled StopIteration #869

Description

@dnicolodi

StopIteration can mask the split-package error in mesonpy/__init__.py:160. In the purelib/platlib conflict branch, next(entry for entry in wheel_files[other] ...) has no default. If the package was first registered by an install_subdirs entry whose directory walked to zero files, packages has the entry but wheel_files[other] has none, and the user gets a raw StopIteration/RuntimeError instead of the helpful BuildError. Use next(..., None) and degrade the message.

Originally reported in #861.

This is a correct observation. However, the condition for triggering it is between very unlikely and impossible. I haven't yet tried to determine whether it is really impossible.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions