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

Python: Migrate to use "implicit namespace packages" (PEP 420) #666

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

amotl
Copy link
Member

@amotl amotl commented Nov 1, 2024

About

... instead of "declared namespaces" for the crate namespace package, see PEP 420, and setuptools docs about namespace_packages.

Historically, there were two methods to create namespace packages. One is the pkg_resources style supported by setuptools and the other one being pkgutils style offered by pkgutils module in Python. Both are now considered deprecated.

-- Legacy Namespace Packages

References

/cc @surister

... instead of "declared namespaces" for the `crate` namespace package,
see PEP 420 [1], and setuptools docs [2].

> Historically, there were two methods to create namespace packages. One
> is the `pkg_resources` style supported by `setuptools` and the other
> one being `pkgutils` style offered by `pkgutils` module in Python.
> Both are now considered _deprecated_.
>
> -- Legacy Namespace Packages [3]

[1] https://peps.python.org/pep-0420/
[2] https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
[3] https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#legacy-namespace-packages
@amotl amotl changed the title Python: Migrate to use "implicit namespace packages" Python: Migrate to use "implicit namespace packages" (PEP 420) Nov 1, 2024
@amotl amotl marked this pull request as ready for review November 1, 2024 13:50
Copy link

@kneth kneth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but definitely not a Python expert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
3 participants