Remove all pkg_resources usage - #108
Conversation
| from pkgutil import extend_path | ||
| __path__ = extend_path(__path__, __name__) | ||
| from pkgutil import extend_path | ||
| __path__ = extend_path(__path__, __name__) |
There was a problem hiding this comment.
According to the packaging guide this namespace style is also obsolete: https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#legacy-namespace-packages
The broader question here would be: are there other paste python distributions that share the namespace and thus should be migrated together?
As a temporal solution maybe https://pypi.org/project/horse-with-no-namespace/ works to patch the problem, though it mentions pkg_resources style namespaces not pkgutil namespaces
| packages=find_packages(exclude=['ez_setup', 'examples', 'packages', 'tests*']), | ||
| package_data=finddata.find_package_data( | ||
| exclude_directories=finddata.standard_exclude_directories + ('tests',)), | ||
| namespace_packages=['paste'], |
There was a problem hiding this comment.
I'm not 100% sure if we need some guiding to setuptools to discover the code as we are not using a src layout model here, according to https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#native-namespace-packages the src layout allows automatic discovery of namespaces, while the flatten does not... but I guess you have tried it and CI is green, so 🤷🏾
Tested this with mediagoblin tests as part of NixOS/nixpkgs#538703