You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ vcs import --input https://raw.githubusercontent.com/ros2/ros2/jazzy/ros2.repos src
Traceback (most recent call last):
File "/opt/homebrew/bin/vcs", line 5, in <module>
from vcstool.commands.vcs import main
File "/opt/homebrew/lib/python3.13/site-packages/vcstool/commands/vcs.py", line 3, in <module>
from vcstool.commands.help import get_entrypoint
File "/opt/homebrew/lib/python3.13/site-packages/vcstool/commands/help.py", line 4, in <module>
from pkg_resources import load_entry_point
File "/opt/homebrew/lib/python3.13/site-packages/pkg_resources/__init__.py", line 2172, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
it seems vcstool it is using deprecated pkg_resources (related: #269).
Solution:
make the following changes in vcstool/commands/help.py:
change from pkg_resources import load_entry_point to from importlib.metadata import entry_points
add following helper function:
def load_vcs_command(commands):
entries = entry_points()
vcs_entry_point = next(
ep for ep in entries
if ep.group == 'console_scripts' and ep.name == 'vcs-' + commands[0]
)
return vcs_entry_point.load()
in function get_entrypoint(command), replace return load_entry_point(... with return load_vcs_command(commands)
The text was updated successfully, but these errors were encountered:
e.g.:
it seems vcstool it is using deprecated pkg_resources (related: #269).
Solution:
make the following changes in vcstool/commands/help.py:
from pkg_resources import load_entry_point
tofrom importlib.metadata import entry_points
get_entrypoint(command)
, replacereturn load_entry_point(...
withreturn load_vcs_command(commands)
The text was updated successfully, but these errors were encountered: