Generated by AI and checked by humans
Summary:
Our build script clones ament_package from the rolling branch without pinning a specific version (see libmicroros.mk):
git clone -b rolling https://github.com/ament/ament_package src/ament_package
On 2026-07-14, PR #167 "type annotations" was merged into ament_package's rolling branch, adding this import to ament_package/templates.py:
from importlib.resources.abc import Traversable
importlib.resources.abc is a submodule introduced in Python 3.11. On Python < 3.11 this import fails with:
ModuleNotFoundError: No module named 'importlib.resources.abc'; 'importlib.resources' is not a package
and there is no fallback/try-except for older Python versions.
Impact:
This breaks every build that runs ament_cmake_core (which imports ament_package.templates) on Python < 3.11. In our CI matrix (espressif/idf:release-vX.Y containers), this maps directly to Python version by base OS:
| ESP-IDF version |
Docker base image |
System Python |
Result |
| v5.2, v5.3 |
ubuntu:22.04 |
3.10 |
fails |
| v5.4, v5.5, v6.0 |
ubuntu:24.04 |
3.12 |
passes |
Suggested fix (upstream): Wrap the importlib.resources.abc import in a try/except fallback (e.g. importlib.abc.Traversable for Python < 3.11), similar to other projects that support this Python matrix.
Our workaround: Pin ament_package to a commit/tag before PR #167 (e.g. tag 0.19.0) instead of tracking the unpinned rolling branch.
Summary:
Our build script clones
ament_packagefrom therollingbranch without pinning a specific version (seelibmicroros.mk):On 2026-07-14, PR #167 "type annotations" was merged into
ament_package'srollingbranch, adding this import toament_package/templates.py:importlib.resources.abcis a submodule introduced in Python 3.11. On Python < 3.11 this import fails with:and there is no fallback/try-except for older Python versions.
Impact:
This breaks every build that runs
ament_cmake_core(which importsament_package.templates) on Python < 3.11. In our CI matrix (espressif/idf:release-vX.Ycontainers), this maps directly to Python version by base OS:ubuntu:22.04ubuntu:24.04Suggested fix (upstream): Wrap the
importlib.resources.abcimport in a try/except fallback (e.g.importlib.abc.Traversablefor Python < 3.11), similar to other projects that support this Python matrix.Our workaround: Pin
ament_packageto a commit/tag before PR #167 (e.g. tag0.19.0) instead of tracking the unpinnedrollingbranch.