Source: pyflakes
Version: 3.2.0-1
Severity: normal
User: debian-pyt...@lists.debian.org
Usertags: python3.13
Forwarded: https://github.com/PyCQA/pyflakes/issues/812

This package failed build from source when test-built against a version of
python3-defaults that includes 3.13 as a supported version.

To reproduce this issue, build against python3-defaults (python3-all-dev etc.)
from Debian experimental.

What's new in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html

Log snippet:

copying pyflakes/test/__init__.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/pyflakes/test
copying pyflakes/test/test_other.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/pyflakes/test
copying pyflakes/test/harness.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/pyflakes/test
copying pyflakes/test/test_api.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/pyflakes/test
copying pyflakes/test/test_type_annotations.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/pyflakes/test
copying pyflakes/test/test_doctests.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/pyflakes/test
copying pyflakes/test/test_code_segment.py -> 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/pyflakes/test
   dh_auto_test -O--buildsystem=pybuild
I: pybuild pybuild:308: mkdir -p 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pyflakes/build/bin && ln -s 
/<<PKGBUILDDIR>>/bin/pyflakes 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pyflakes/build/bin/pyflakes
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pyflakes/build; 
python3.13 -m pytest 
============================= test session starts ==============================
platform linux -- Python 3.13.0rc2, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collected 730 items

pyflakes/test/test_api.py ...............................F....F...       [  5%]
pyflakes/test/test_builtin.py ..                                         [  5%]
pyflakes/test/test_code_segment.py .....                                 [  6%]
pyflakes/test/test_dict.py .........................                     [  9%]
pyflakes/test/test_doctests.py .................s....................... [ 15%]
...............................s........................................ [ 25%]
........................................................................ [ 35%]
...............ss..s..........s.......s..............                    [ 42%]
pyflakes/test/test_imports.py ....................................s..... [ 48%]
........................................................................ [ 58%]
...................                                                      [ 60%]
pyflakes/test/test_is_literal.py ...............................         [ 64%]
pyflakes/test/test_match.py ........                                     [ 66%]
pyflakes/test/test_other.py .................s.......................... [ 72%]
.........................................s.............................. [ 81%]
..............                                                           [ 83%]
pyflakes/test/test_type_annotations.py ................................. [ 88%]
..................                                                       [ 90%]
pyflakes/test/test_undefined_names.py .................................. [ 95%]
...............ss..s..........s..                                        [100%]

=================================== FAILURES ===================================
_____________________ IntegrationTests.test_errors_syntax ______________________

self = <pyflakes.test.test_api.IntegrationTests testMethod=test_errors_syntax>

    def test_errors_syntax(self):
        """
        When pyflakes finds errors with the files it's given, (if they don't
        exist, say), then the return code is non-zero and the errors are
        printed to stderr.
        """
        with open(self.tempfilepath, 'wb') as fd:
            fd.write(b"import")
        d = self.runPyflakes([self.tempfilepath])
        error_msg = '{0}:1:7: invalid syntax{1}import{1}      ^{1}'.format(
            self.tempfilepath, os.linesep)
>       self.assertEqual(d, ('', error_msg, 1))
E       AssertionError: Tuples differ: ('', "/tmp/tmpomkeo5fa/temp:1:7: 
Expected one [47 chars]", 1) != ('', '/tmp/tmpomkeo5fa/temp:1:7: invalid 
synta[20 chars]', 1)
E       
E       First differing element 1:
E       "/tmp/tmpomkeo5fa/temp:1:7: Expected one [43 chars] ^\n"
E       '/tmp/tmpomkeo5fa/temp:1:7: invalid synta[16 chars] ^\n'
E       
E       + ('', '/tmp/tmpomkeo5fa/temp:1:7: invalid syntax\nimport\n      ^\n', 
1)
E       - ('',
E       -  "/tmp/tmpomkeo5fa/temp:1:7: Expected one or more names after 
'import'\n"
E       -  'import\n'
E       -  '      ^\n',
E       -  1)

pyflakes/test/test_api.py:779: AssertionError
_________________________ TestMain.test_errors_syntax __________________________

self = <pyflakes.test.test_api.TestMain testMethod=test_errors_syntax>

    def test_errors_syntax(self):
        """
        When pyflakes finds errors with the files it's given, (if they don't
        exist, say), then the return code is non-zero and the errors are
        printed to stderr.
        """
        with open(self.tempfilepath, 'wb') as fd:
            fd.write(b"import")
        d = self.runPyflakes([self.tempfilepath])
        error_msg = '{0}:1:7: invalid syntax{1}import{1}      ^{1}'.format(
            self.tempfilepath, os.linesep)
>       self.assertEqual(d, ('', error_msg, 1))
E       AssertionError: Tuples differ: ('', "/tmp/tmp1sdggqia/temp:1:7: 
Expected one [47 chars]", 1) != ('', '/tmp/tmp1sdggqia/temp:1:7: invalid 
synta[20 chars]', 1)
E       
E       First differing element 1:
E       "/tmp/tmp1sdggqia/temp:1:7: Expected one [43 chars] ^\n"
E       '/tmp/tmp1sdggqia/temp:1:7: invalid synta[16 chars] ^\n'
E       
E       + ('', '/tmp/tmp1sdggqia/temp:1:7: invalid syntax\nimport\n      ^\n', 
1)
E       - ('',
E       -  "/tmp/tmp1sdggqia/temp:1:7: Expected one or more names after 
'import'\n"
E       -  'import\n'
E       -  '      ^\n',
E       -  1)

pyflakes/test/test_api.py:779: AssertionError
=========================== short test summary info ============================
FAILED pyflakes/test/test_api.py::IntegrationTests::test_errors_syntax - Asse...
FAILED pyflakes/test/test_api.py::TestMain::test_errors_syntax - AssertionErr...
================== 2 failed, 714 passed, 14 skipped in 1.78s ===================
E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pyflakes/build; python3.13 -m pytest 
I: pybuild pybuild:308: mkdir -p 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/bin && ln -s 
/<<PKGBUILDDIR>>/bin/pyflakes 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/bin/pyflakes
I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build; 
python3.12 -m pytest 
============================= test session starts ==============================
platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0
rootdir: /<<PKGBUILDDIR>>
plugins: typeguard-4.3.0
collected 730 items

pyflakes/test/test_api.py ........................................       [  5%]
pyflakes/test/test_builtin.py ..                                         [  5%]
pyflakes/test/test_code_segment.py .....                                 [  6%]
pyflakes/test/test_dict.py .........................                     [  9%]
pyflakes/test/test_doctests.py .................s....................... [ 15%]
...............................s........................................ [ 25%]
........................................................................ [ 35%]
...............ss..s..........s.......s..............                    [ 42%]
pyflakes/test/test_imports.py ....................................s..... [ 48%]
........................................................................ [ 58%]
...................                                                      [ 60%]
pyflakes/test/test_is_literal.py ...............................         [ 64%]
pyflakes/test/test_match.py ........                                     [ 66%]
pyflakes/test/test_other.py .................s.......................... [ 72%]
.........................................s.............................. [ 81%]
..............                                                           [ 83%]
pyflakes/test/test_type_annotations.py ................................. [ 88%]
..................                                                       [ 90%]
pyflakes/test/test_undefined_names.py .................................. [ 95%]
...............ss..s..........s..                                        [100%]

======================= 716 passed, 14 skipped in 1.75s ========================
I: pybuild pybuild:334: rm -rf 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_pyflakes/build/bin
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.13 
3.12" returned exit code 13
make: *** [debian/rules:15: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 2024-09-18T19:18:14Z


If required, the full build log is available here (for the next 30 days):
https://debusine.debian.net/artifact/778363/

This bug has been filed at "normal" severity, as we haven't started the
transition to add 3.13 as a supported version, yet. This will be raised to RC
as soon as that happens, hopefully well before trixie.

Thanks,

Stefano

Reply via email to