Skip to content

bpython shell cannot import python namespace packages #835

Description

@tbabej

In Python 3.3, python namespace packages were introduced [0] - namespace package is a virtual package whose contents can be distributed in various places along Python's PATH. TL;DR

Currently importing a namespace package in bpython fails with:

>>> import my_namespace
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    import my_namespace
ModuleNotFoundError: No module named 'my_namespace'

whereas the identical python distribution, just running native shell, produces:

>>> import my_namespace
>>> my_namespace
<module 'my_namespace' (namespace)> 

[0] https://www.python.org/dev/peps/pep-0420/

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions