Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931848 - dev-python/libcst-1.3.1 fails tests: FAILED test_codemod_cli.py::TestCodemodCLI::test_codemod_formatter_error_input - AssertionError
Summary: dev-python/libcst-1.3.1 fails tests: FAILED test_codemod_cli.py::TestCodemodC...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-05-13 07:18 UTC by Agostino Sarubbo
Modified: 2024-05-13 07:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,65.96 KB, application/x-xz)
2024-05-13 07:18 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-05-13 07:18:15 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/libcst-1.3.1 fails tests.
Discovered on: amd64 (internal ref: ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0015
Comment 1 Agostino Sarubbo gentoo-dev 2024-05-13 07:18:16 UTC
Created attachment 892850 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2024-05-13 07:18:17 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


'
')
 - 0 warnings were generated.

0.36s 0% complete, [calculating] estimated for 1 files to go...
Finished codemodding 1 files!

Codemodding /var/tmp/portage/dev-python/libcst-1.3.1/work/libcst-1.3.1-pypy3/install/usr/lib/pypy3.10/site-packages/libcst/codemod/tests/codemod_formatter_error_input.py.txt
E           AssertionError: 'error: cannot format -: Cannot parse: 13:10:     async with AsyncExitStack() as stack:' not found in 'Calculating full-repo metadata...
ERROR setuptools_scm._file_finders.git listing git files failed - pretending there aren't any
Executing codemod...
FAILED libcst/codemod/tests/test_codemod_cli.py::TestCodemodCLI::test_codemod_formatter_error_input - AssertionError: 'error: cannot format -: Cannot parse: 13:10:     async with AsyncExitStack() as stack:' not found in 'Calculating full-repo metadata...
 - Failed to codemod 1 files.
Failed to codemod /var/tmp/portage/dev-python/libcst-1.3.1/work/libcst-1.3.1-pypy3/install/usr/lib/pypy3.10/site-packages/libcst/codemod/tests/codemod_formatter_error_input.py.txt
  File "/usr/lib/pypy3.10/site-packages/black/cache.py", line 21, in <module>
  File "/usr/lib/pypy3.10/site-packages/black/__init__.py", line 38, in <module>
  File "/usr/lib/pypy3.10/subprocess.py", line 421, in check_output
  File "/usr/lib/pypy3.10/subprocess.py", line 526, in run
  File "/usr/lib/python-exec/pypy3/black", line 5, in <module>
  File "/var/tmp/portage/dev-python/libcst-1.3.1/work/libcst-1.3.1-pypy3/install/usr/lib/pypy3.10/site-packages/libcst/codemod/_cli.py", line 314, in _execute_transform
  File "/var/tmp/portage/dev-python/libcst-1.3.1/work/libcst-1.3.1-pypy3/install/usr/lib/pypy3.10/site-packages/libcst/codemod/_cli.py", line 56, in invoke_formatter
    from black.cache import Cache
    from black import patched_main
    from typing_extensions import Self
[gw40] [2028/2031] FAILED libcst/codemod/tests/test_codemod_cli.py::TestCodemodCLI::test_codemod_formatter_error_input 
KeyError: 'setuptools_scm'
ModuleNotFoundError: No module named \'typing_extensions\'
    newcode = invoke_formatter(config.formatter_args, newcode)
                "ParserSyntaxError: Syntax Error @ 14:11.",
    raise CalledProcessError(retcode, process.args,
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
rlt        = CompletedProcess(args=['/var/tmp/portage/dev-python/libcst-1.3.1/work/libcst-1.3.1-pypy3/install/usr/bin/pypy3', '-m', 'libcst.tool', 'codemod', 'remove_unused_imports.RemoveUnusedImportsCommand', '--python-version', '3.6', '/var/tmp/portage/dev-python/libcst-1.3.1/work/libcst-1.3.1-pypy3/install/usr/lib/pypy3.10/site-packages/libcst/codemod/tests/codemod_formatter_error_input.py.txt'], returncode=1, stdout=b'', stderr=b'Calculating full-repo metadata...
 - Skipped 0 files.
subprocess.CalledProcessError: Command \'[\'/usr/bin/black\', \'--target-version\', \'py36\', \'-\']\' returned non-zero exit status 1.
    subprocess.check_output(
Traceback (most recent call last):
 - Transformed 0 files successfully.
                "error: cannot format -: Cannot parse: 13:10:     async with AsyncExitStack() as stack:",