Skip to content

CI fails on ESP-IDF v5.2/v5.3 due to ament_package requiring Python 3.11+ #371

Description

@Narukara

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions