Given that the solution proposed is to ship a custom patch, I'm going to bump this to a FFe to get acceptance of the release-team and also unblock the excuses transition in existing Noble development cycle.
If you install python3-flake8 in regular Noble right now, you get version 5.0.4.
flake8 depends on pydocstyle, which was updated to a newer version (6.3.0),
which changed API. So attempting to run flake8 fails at startup, trying to call
an invalid API.
python3-flake8 7.0.0 and 8.1.1 (the latest) both fix this issue.
8.1.1 is currently the version in noble-proposed. However, it has been stuck in
proposed for several months because pythonpytest-flake8 fails tests when used
against that version.
---- 8< -----------------------------
08:29:45 _________________________________ test_flake8 __________________________________
08:29:45 /usr/lib/python3/dist-packages/flake8/plugins/finder.py:296: in _load_plugin
08:29:45 obj = plugin.entry_point.load()
08:29:45 /usr/lib/python3.12/importlib/metadata/__init__.py:205: in load
08:29:45 module = import_module(match.group('module'))
08:29:45 /usr/lib/python3.12/importlib/__init__.py:90: in import_module
08:29:45 return _bootstrap._gcd_import(name[level:], package, level)
08:29:45 /usr/lib/python3/dist-packages/flake8/plugins/pycodestyle.py:25: in <module>
08:29:45 from pycodestyle import missing_whitespace_around_operator as _missing_whitespace_around_operator # noqa: E501
08:29:45 E ImportError: cannot import name 'missing_whitespace_around_operator' from 'pycodestyle' (/usr/lib/python3/dist-packages/pycodestyle.py). Did you mean: 'whitespace_around_operator'?
---- 8< -----------------------------
[Testing done]
We have been injecting the python3-flake version in noble-proposed into the ROS
buildfarm build, see that there are no failures any more, software run as expected: https://ci.ros2.org/job/ci_linux/20828/console
---- 8< ------------------------------
[33m=============================== warnings summary ===============================[0m
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
test/test_flake8.py::test_flake8
/usr/lib/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=259742) is multi-threaded, use of fork() may lead to deadlocks in the child.
self.pid = os.fork()
The ROS buildfarm is a large project for testing lot of software packages in open
source robotics and the use of flake8 is integrated into each python package. We
have been using it last weeks without problems.
Given that the solution proposed is to ship a custom patch, I'm going to bump this to a FFe to get acceptance of the release-team and also unblock the excuses transition in existing Noble development cycle.
* Merge request: https:/ /code.launchpad .net/~j- rivero/ ubuntu/ +source/ python- pytest- flake8/ +git/python- pytest- flake8/ +merge/ 464197 /code.launchpad .net/~j- rivero/ +recipe/ python- pytest- flake8- daily
* Build tested: https:/
[Justification] /ubuntu- archive- team.ubuntu. com/proposed- migration/ update_ excuses. html#python- flake8
This package is stopping the transition in Noble from noble-proposed to noble of python3-flake8, see https:/
If you install python3-flake8 in regular Noble right now, you get version 5.0.4.
flake8 depends on pydocstyle, which was updated to a newer version (6.3.0),
which changed API. So attempting to run flake8 fails at startup, trying to call
an invalid API.
python3-flake8 7.0.0 and 8.1.1 (the latest) both fix this issue.
8.1.1 is currently the version in noble-proposed. However, it has been stuck in
proposed for several months because pythonpytest-flake8 fails tests when used
against that version.
See the problem in the long build of the ROS buildfarm: /build. ros2.org/ view/Rdev/ job/Rdev_ _ros2cli_ _ubuntu_ noble_amd64/ 2/console
https:/
---- 8< ------- ------- ------- ------- - _______ _______ _______ _____ test_flake8 _______ _______ _______ _______ ______ python3/ dist-packages/ flake8/ plugins/ finder. py:296: in _load_plugin entry_point. load() python3. 12/importlib/ metadata/ __init_ _.py:205: in load module( match.group( 'module' )) python3. 12/importlib/ __init_ _.py:90: in import_module _gcd_import( name[level: ], package, level) python3/ dist-packages/ flake8/ plugins/ pycodestyle. py:25: in <module> whitespace_ around_ operator as _missing_ whitespace_ around_ operator # noqa: E501 whitespace_ around_ operator' from 'pycodestyle' (/usr/lib/ python3/ dist-packages/ pycodestyle. py). Did you mean: 'whitespace_ around_ operator' ? ------- ------- ------- -
08:29:45 _______
08:29:45 /usr/lib/
08:29:45 obj = plugin.
08:29:45 /usr/lib/
08:29:45 module = import_
08:29:45 /usr/lib/
08:29:45 return _bootstrap.
08:29:45 /usr/lib/
08:29:45 from pycodestyle import missing_
08:29:45 E ImportError: cannot import name 'missing_
---- 8< -------
[Testing done]
We have been injecting the python3-flake version in noble-proposed into the ROS /ci.ros2. org/job/ ci_linux/ 20828/console ------- ------- ------- -- ======= ======= ======= ======= = warnings summary ======= ======= ======= ======= ===[0m flake8. py::test_ flake8 flake8. py::test_ flake8 flake8. py::test_ flake8 flake8. py::test_ flake8 flake8. py::test_ flake8 flake8. py::test_ flake8 flake8. py::test_ flake8 flake8. py::test_ flake8 lib/python3. 12/multiprocess ing/popen_ fork.py: 66: DeprecationWarning: This process (pid=259742) is multi-threaded, use of fork() may lead to deadlocks in the child.
buildfarm build, see that there are no failures any more, software run as expected:
https:/
---- 8< -------
[33m==
test/test_
test/test_
test/test_
test/test_
test/test_
test/test_
test/test_
test/test_
/usr/
self.pid = os.fork()
-- Docs: https:/ /docs.pytest. org/en/ stable/ how-to/ capture- warnings. html ------- ------- ------- --
---
---- 8< -------
The ROS buildfarm is a large project for testing lot of software packages in open
source robotics and the use of flake8 is integrated into each python package. We
have been using it last weeks without problems.