AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'
版本: 1.5.3
报错日志:
lib/python3.12/site-packages/lark_oapi/ws/pb/google/init.py", line 2, in
2026年开始Setuptools 81.0.0+ 删除了 pkg_resources.declare_namespace
临时解决方案: pin setuptools版本:
setuptools<81
或者手工改下代码ws/pb/google/init.py
This deprecation warning affects users with newer setuptools versions. In setuptools>=81, pkg_resources is removed and will cause AttributeError instead of just UserWarning.
The fix is straightforward - replace the pkg_resources workaround in lark_oapi/ws/pb/google/init.py with importlib.resources or importlib's namespace approach.
As setuptools 81 removal is scheduled for 2025-11-30, this needs to be fixed before it becomes a hard error for all users. Could this be prioritized?