Skip to content

Switch to PEP 420 (Implicit namespace packages) #194

@icemac

Description

@icemac

Currently we use pkg_resources-style namespace packages. Using pkg_resources is deprecated (see https://setuptools.pypa.io/en/latest/pkg_resources.html), it seems not yet clear when it is removed from setuptools.

The current future are PEP 420: Implicit namespace packages.

This requires:

  • all the packages sharing a namespace to switch over to PEP 420.
  • removing the __init__.py files existing to create a namespace
  • removing namespace_packages declaration from setup.py
  • maybe removal of the dependency on setuptools? (Maybe we could even switch to pyproject.toml.)

zopefoundation hosts the following namespaces:

See the discussion in pypa/setuptools#3434 for some more details.

Suggestion:

  • ✅ Try out on a small namespace where probably all packages are hosted by zopefoundation (grokcore?, z3c?, zope.app?)
  • If this works fine (especially in zc.buildout), adapt the other namespaces.
    • This will require coordination with the Plone folks.
    • This would also require a big warning sign that other packages hosted outside zopefoundation but using the same namespaces also have to switch to PEP 420.

Cc-ing: @dataflake @mauritsvanrees @gforcada @mgedmin @jensens

See also https://packaging.python.org/en/latest/guides/packaging-namespace-packages/

Sub-issues

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions