[FFe] colcon-core argument parsing is broken by recent changes to Python 3.11+
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ros2-colcon-core (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
Patch version to solve a critical problem with colcon argument parsing mechanism.
* Merge request: https:/
* PPA related: https:/
[Justification]
Recent changes to Python which have been backported to Python 3.11 and 3.12 break colcon argument parsing due to a dependency on private API in argparse. A fix has been released in colcon-core 0.16.1 which should be backported to any platforms which will receive the updated Python releases. The python3-colcon-core package currently in Ubuntu Noble is suffering from this issue now.
The current version in 0.15.2-1 fails to build due to problem in the test suite that detect this problem: https:/
A quick test on Noble reports the problem:
-------
$ mkdir /tmp/colcon-repro && cd /tmp/colcon-repro
$ colcon build --cmake-args --no-warn-
Expected:
Summary: 0 packages finished
Actual:
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL] {build,
colcon: error: unrecognized arguments: --no-warn-
-------
[testing done]
After using the changes proposed:
-------
jrivero@
(Reading database ... 58627 files and directories currently installed.)
Preparing to unpack python3-
Unpacking python3-colcon-core (0.15.2-1ubuntu1) over (0.15.2-1) ...
Setting up python3-colcon-core (0.15.2-1ubuntu1) ...
jrivero@
Summary: 0 packages finished [0.28s]
-------
Playing with other colcon workspaces does not show any problem to
my eyes when passing different cmake-args like modifying the CMAKE_BUILD_TYPE.
[Original Scott email]
--- 8< -------
Recent changes to Python which have been backported to Python 3.11 and 3.12 break colcon argument parsing due to a dependency on private API in argparse.
A fix has been released in colcon-core 0.16.1 which should be backported to any platforms which will receive the updated Python releases.
The python3-colcon-core package currently in Ubuntu Noble is suffering from this issue now.
Related branches
- Benjamin Drung (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 93 lines (+59/-1)4 files modifieddebian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/0004-Fix-argument-parsing-in-newer-Python.patch (+49/-0)
debian/patches/series (+1/-0)
Status changed to 'Confirmed' because the bug affects multiple users.