Skip to content

Uncertainty on how to implement namespace packages (as in PEP 420) via import hooks #588

@abravalheri

Description

@abravalheri

Problem description

In a discussion about PEP 660 (editable installs), it was noted that it is difficult to handle namespace packages using a MetaPathFinder, the main challenge being dynamic path computation.

The consequence is that editable (used by many backends to implement PEP 660) is still not able to support namespaces.

I have proposed two approaches in the Python dicourse, Users category, however I am not sure if these solutions work just by accident (and therefore can be considered fragile/likely to break in future releases). Unfortunately this post has not received any feedback yet.

It would be good if we can clarify what is the recommended approach for implementing editable namespaces via import hooks/finders (or at least if we can consider the proposed approaches stable).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions