[FFe] python-pytest-flake8 FTBFS against python-flake8 7

Bug #2058914 reported by Olivier Gayot
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-flake8 (Ubuntu)
Confirmed
Undecided
Unassigned
python-pytest-flake8 (Debian)
Fix Released
Unknown
python-pytest-flake8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Since the move from python-flake8 5.0.4 to 7.0.0, python-pytest-flake8 fails fails its autopkgtest and FTBFS.

The project upstream is abandoned according to https://github.com/tholo/pytest-flake8/issues/98

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058300

Reverse-Testsuite-Triggers
==========================
* pytest-pylint (for python3-pytest-flake8)
* python-cssselect2 (for python3-pytest-flake8)
* python-tinycss2 (for python3-pytest-flake8)
* rpmlint (for python3-pytest-flake8)

Reverse-Build-Depends
=====================
* cvise (for python3-pytest-flake8)
* pytest-pylint (for python3-pytest-flake8)
* python-cssselect2 (for python3-pytest-flake8)
* python-tinycss2 (for python3-pytest-flake8)
* rpmlint (for python3-pytest-flake8)

Related branches

Olivier Gayot (ogayot)
tags: added: update-excuse
Changed in python-pytest-flake8 (Debian):
status: Unknown → New
Revision history for this message
Jose Luis Rivero (j-rivero) wrote :

We (at the Open Robotics Foundation Alliance) are interested in helping with the transition of python-flake8 from noble-proposed to noble and have been monitoring the transition for some weeks.

There is an attempt of fixing the code in https://github.com/tholo/pytest-flake8/pull/96 that we can work on trying to make it to work, although seems not to work on pytest8 which is the one in Ubuntu noble-proposed. That said, it is true that the repository does not host new commits since 2 years ago.

Not sure what would be best, if RM the package or invest time into patching it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-flake8 (Ubuntu):
status: New → Confirmed
Changed in python-pytest-flake8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Jose Luis Rivero (j-rivero) wrote :

> Not sure what would be best, if RM the package or invest time into patching it.

Since no action happened last week, my teammate Chris Lalancette patched the existing version to work with current flake8 on noble-proposed 7.0.0. I have updated the upstream PR with the information https://github.com/tholo/pytest-flake8/pull/96#issuecomment-2032433686, tested changes in a docker noble with:

 * flake8 7.0.0-1 (probably any version above 6 could work)
 * pytest 7.4.4-1 and pytest 8.0.2-1

I've created a PPA for testing the changes in proposed, builds fine in amd64
https://launchpad.net/~j-rivero/+archive/ubuntu/python-pytest-flake8-noble/+packages

The .debdiff against current noble version is attached in this comment.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "python-pytest-flake8_1.1.1-4ubuntu1.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Changed in python-pytest-flake8 (Debian):
status: New → Confirmed
Revision history for this message
Jose Luis Rivero (j-rivero) wrote :
Download full text (3.3 KiB)

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
 * Build tested: https://code.launchpad.net/~j-rivero/+recipe/python-pytest-flake8-daily

[Justification]
This package is stopping the transition in Noble from noble-proposed to noble of python3-flake8, see https://ubuntu-archive-team.ubuntu.com/proposed-migration/update_excuses.html#python-flake8

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:
https://build.ros2.org/view/Rdev/job/Rdev__ros2cli__ubuntu_noble_amd64/2/console

---- 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< ------------------------------
=============================== warnings summary ===============================
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()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---
---- 8< ------------------------------

T...

Read more...

summary: - python-pytest-flake8 FTBFS against python-flake8 7
+ [FFe] python-pytest-flake8 FTBFS against python-flake8 7
Revision history for this message
Jose Luis Rivero (j-rivero) wrote :

python-flake8 7.0.0 is no Noble (main repo).

Changed in python-pytest-flake8 (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.