Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop falling back to pkgutil #326

Closed
wants to merge 1 commit into from
Closed

Stop falling back to pkgutil #326

wants to merge 1 commit into from

Commits on Feb 27, 2019

  1. Stop falling back to pkgutil

    Falling back to `pkgutil` is now [discouraged](https://packaging.python.org/guides/packaging-namespace-packages/):
    > Note Some older recommendations advise the following in the namespace package `__init__.py`:
    >```
    > try:
    >     __import__('pkg_resources').declare_namespace(__name__)
    > except ImportError:
    >     __path__ = __import__('pkgutil').extend_path(__path__, __name__)
    >```
    > The idea behind this was that in the rare case that `setuptools` isn’t available packages would fall-back to the `pkgutil`-style packages. This isn’t advisable because `pkgutil` and `pkg_resources`-style namespace packages are not cross-compatible. If the presence of `setuptools` is a concern then the package should just explicitly depend on `setuptools` via `install_requires`.
    jeffwidman committed Feb 27, 2019
    Configuration menu
    Copy the full SHA
    29c1cba View commit details
    Browse the repository at this point in the history