Skip to content

No-op str.replace in the editable path hook #868

Description

@dnicolodi

In mesonpy/_editable.py:352, path.replace(os.altsep, os.sep) is called but its results is discarded. It needs path = path.replace(...) to be effective. On POSIX altsep is None so nothing is affected, but on Windows the intended separator normalization never happens before path.rpartition(os.sep).

Originally reported in #861.

Is there a bug because of the missing normalization or is the normalization unnecessary? Things seem to work with the code as it is, but the interactions in this code are quite complex, thus there may be a latent bug... Needs some more thinking and probably some tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions