Bug#1028278: dh-cmake FTBFS with Python 3.11 as default version

2023-01-13 Thread Andreas Henriksson
On Mon, Jan 09, 2023 at 08:02:05AM +0200, Adrian Bunk wrote:
> Source: dh-cmake
> Version: 0.6.1
> Severity: serious
> Tags: ftbfs bookworm sid
> 
> https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/dh-cmake.html
[...]
> 
>   File "/build/1st/dh-cmake-0.6.1/dhcmake/tests/source_check.py", line 25, in 
> 
> self.foreach_py(lambda a, r, c: self.assertEqual(autopep8.fix_code(c), c,
> ^
> AssertionError: '# Th[204 chars]\n\n# from unittest import skip\n\nimport 
> os\n[9838 chars]e)\n' != '# Th[204 chars]\n\n#from unittest import 
> skip\n\nimport os\nf[9837 chars]e)\n'
> Diff is 10430 characters long. Set self.maxDiff to None to see it. : File 
> dhcmake/tests/common.py is incorrectly formatted
[...]

So same as above, but in my own words:
It seems autopep8.fix_code() has changed it's opinion on formatting and
now thinks dhcmake/tests/common.py line 5 should have a space after
the hash (#) character (before `from unittest import skip`).

The new style looks better IMHO and this might be a bugfix in
autopep8.fix_code(), but at the same time changes like these might cause
alot of breakage (atleast if used in tests like in this case).

Regards,
Andreas Henriksson



Bug#1028278: dh-cmake FTBFS with Python 3.11 as default version

2023-01-08 Thread Adrian Bunk
Source: dh-cmake
Version: 0.6.1
Severity: serious
Tags: ftbfs bookworm sid

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/dh-cmake.html

...
==
FAIL: test_autopep8 
(dhcmake.tests.source_check.SourceCheckTestCase.test_autopep8)
--
Traceback (most recent call last):
  File "/build/1st/dh-cmake-0.6.1/dhcmake/tests/source_check.py", line 25, in 
test_autopep8
self.foreach_py(lambda a, r, c: self.assertEqual(autopep8.fix_code(c), c,
  File "/build/1st/dh-cmake-0.6.1/dhcmake/tests/source_check.py", line 22, in 
foreach_py
func(filename_abs, filename_rel, contents)
  File "/build/1st/dh-cmake-0.6.1/dhcmake/tests/source_check.py", line 25, in 

self.foreach_py(lambda a, r, c: self.assertEqual(autopep8.fix_code(c), c,
^
AssertionError: '# Th[204 chars]\n\n# from unittest import skip\n\nimport 
os\n[9838 chars]e)\n' != '# Th[204 chars]\n\n#from unittest import 
skip\n\nimport os\nf[9837 chars]e)\n'
Diff is 10430 characters long. Set self.maxDiff to None to see it. : File 
dhcmake/tests/common.py is incorrectly formatted

--
Ran 106 tests in 429.833s

FAILED (failures=1)
Test failed: 
error: Test failed: 
E: pybuild pybuild:388: test: plugin distutils failed with: exit code=1: 
python3.11 setup.py test 
dh_auto_test: error: pybuild --test -i python{version} -p "3.10 3.11" returned 
exit code 13
make: *** [debian/rules:6: binary] Error 25