--- Begin Message ---
Source: python-yamlfix
Version: 1.16.0-1
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20240728 ftbfs-trixie
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> debian/rules binary
> dh binary --buildsystem=pybuild
> dh_update_autotools_config -O--buildsystem=pybuild
> dh_autoreconf -O--buildsystem=pybuild
> dh_auto_configure -O--buildsystem=pybuild
> dh_auto_build -O--buildsystem=pybuild
> I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build"
> module
> I: pybuild base:311: python3.12 -m build --skip-dependency-check
> --no-isolation --wheel --outdir
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_yamlfix
> * Building wheel...
> - Adding .pdm-build/yamlfix-1.16.0.dist-info/METADATA ->
> yamlfix-1.16.0.dist-info/METADATA
> - Adding .pdm-build/yamlfix-1.16.0.dist-info/WHEEL ->
> yamlfix-1.16.0.dist-info/WHEEL
> - Adding .pdm-build/yamlfix-1.16.0.dist-info/entry_points.txt ->
> yamlfix-1.16.0.dist-info/entry_points.txt
> - Adding .pdm-build/yamlfix-1.16.0.dist-info/licenses/LICENSE ->
> yamlfix-1.16.0.dist-info/licenses/LICENSE
> - Adding src/yamlfix/__init__.py -> yamlfix/__init__.py
> - Adding src/yamlfix/adapters.py -> yamlfix/adapters.py
> - Adding src/yamlfix/config.py -> yamlfix/config.py
> - Adding src/yamlfix/entrypoints/__init__.py ->
> yamlfix/entrypoints/__init__.py
> - Adding src/yamlfix/entrypoints/cli.py -> yamlfix/entrypoints/cli.py
> - Adding src/yamlfix/model.py -> yamlfix/model.py
> - Adding src/yamlfix/py.typed -> yamlfix/py.typed
> - Adding src/yamlfix/services.py -> yamlfix/services.py
> - Adding src/yamlfix/version.py -> yamlfix/version.py
> - Adding yamlfix-1.16.0.dist-info/RECORD -> yamlfix-1.16.0.dist-info/RECORD
> Successfully built yamlfix-1.16.0-py3-none-any.whl
> I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with
> "installer" module
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:311: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_yamlfix/build; python3.12 -m pytest
> tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.12.4, pytest-8.3.1, pluggy-1.5.0
> rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_yamlfix/build
> configfile: pyproject.toml
> plugins: xdist-3.6.1, cov-5.0.0
> created: 8/8 workers
> 8 workers [139 items]
>
> ...................FF.F......F.FF.F.F.......FFF...F..........F.....F.... [
> 51%]
> .............F...................................................F.
> [100%]
> =================================== FAILURES
> ===================================
> _________________________ test_verbose_option[1-False]
> _________________________
> [gw2] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7fb72dce3560>, verbose = 1
> requires_fixing = False
>
> @pytest.mark.secondary()
> @pytest.mark.parametrize(
> ("verbose", "requires_fixing"), product([0, 1, 2], [True, False])
> )
> def test_verbose_option(runner: CliRunner, verbose: int, requires_fixing:
> bool) -> None:
> """Prints debug level logs only when called with --verbose"""
> # Clear logging handlers for logs to work with CliRunner
> # For more info see https://github.com/pallets/click/issues/1053)
> logging.getLogger().handlers = []
> source = "program: yamlfix" if requires_fixing else "---\nprogram:
> yamlfix\n"
> args = ["-"]
> if verbose >= 1:
> args.append("--verbose")
> if verbose >= 2:
> args.append("-v")
>
> result = runner.invoke(cli, args, input=source)
>
> debug_log_format = "[\033[37m+\033[0m]"
> unchanged_log_format = "[\033[32m+\033[0m]"
> info_log_format = "[\033[36m+\033[0m]"
> # Check that changes are printed at info level
> assert (f"{info_log_format} Fixed <stdin>" in result.stderr) ==
> requires_fixing
> if verbose == 0:
> assert debug_log_format not in result.stderr
> assert unchanged_log_format not in result.stderr
> if verbose >= 1:
> # If no changes are required, unchanged log should not be printed
> > assert (unchanged_log_format in result.stderr) != requires_fixing
> E AssertionError: assert ('[\x1b[32m+\x1b[0m]' in
> '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n') != False
> E + where '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n' = <Result
> PydanticDeprecatedSince20('The `dict` method is deprecated; use `model_dump`
> instead.')>.stderr
>
> tests/e2e/test_cli.py:160: AssertionError
> __________________________ test_include_exclude_files
> __________________________
> [gw1] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f14ce1b0f20>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw1/test_include_exclude_files0')
>
> def test_include_exclude_files(runner: CliRunner, tmp_path: Path) -> None:
> """Correct only files matching include, and ignore files matching
> exclude."""
> include1 = tmp_path / "source_1.yaml"
> exclude1 = tmp_path / "source_2.txt"
> (tmp_path / "foo").mkdir()
> exclude2 = tmp_path / "foo" / "source_3.yaml"
> (tmp_path / "foo" / "bar").mkdir()
> exclude3 = tmp_path / "foo" / "bar" / "source_4.yaml"
> (tmp_path / "foo" / "baz").mkdir()
> exclude4 = tmp_path / "foo" / "baz" / "source_5.yaml"
> test_files = [include1, exclude1, exclude2, exclude3, exclude4]
> init_source = "program: yamlfix"
> for test_file in test_files:
> test_file.write_text(init_source)
> fixed_source = dedent(
> """\
> ---
> program: yamlfix
> """
> )
>
> result = runner.invoke(
> cli,
> [str(tmp_path)]
> + [
> "--include",
> "*.yaml",
> "--exclude",
> "foo/*.yaml",
> "--exclude",
> "foo/**/*.yaml",
> ],
> )
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:124: AssertionError
> ____________________________ test_corrects_one_file
> ____________________________
> [gw0] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f5f23e91d60>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw0/test_corrects_one_file0')
>
> def test_corrects_one_file(runner: CliRunner, tmp_path: Path) -> None:
> """Correct the source code of a file."""
> test_file = tmp_path / "source.yaml"
> test_file.write_text("program: yamlfix")
> fixed_source = dedent(
> """\
> ---
> program: yamlfix
> """
> )
>
> result = runner.invoke(cli, [str(test_file)])
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:48: AssertionError
> __________________________ test_corrects_three_files
> ___________________________
> [gw0] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f5f23e93a70>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw0/test_corrects_three_files0')
>
> @pytest.mark.secondary()
> def test_corrects_three_files(runner: CliRunner, tmp_path: Path) -> None:
> """Correct the source code of multiple files."""
> test_files = []
> for file_number in range(3):
> test_file = tmp_path / f"source_{file_number}.yaml"
> test_file.write_text("program: yamlfix")
> test_files.append(test_file)
> fixed_source = dedent(
> """\
> ---
> program: yamlfix
> """
> )
>
> result = runner.invoke(cli, [str(test_file) for test_file in
> test_files])
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:69: AssertionError
> _________________________ test_verbose_option[0-True]
> __________________________
> [gw1] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f14cd00d910>, verbose = 0
> requires_fixing = True
>
> @pytest.mark.secondary()
> @pytest.mark.parametrize(
> ("verbose", "requires_fixing"), product([0, 1, 2], [True, False])
> )
> def test_verbose_option(runner: CliRunner, verbose: int, requires_fixing:
> bool) -> None:
> """Prints debug level logs only when called with --verbose"""
> # Clear logging handlers for logs to work with CliRunner
> # For more info see https://github.com/pallets/click/issues/1053)
> logging.getLogger().handlers = []
> source = "program: yamlfix" if requires_fixing else "---\nprogram:
> yamlfix\n"
> args = ["-"]
> if verbose >= 1:
> args.append("--verbose")
> if verbose >= 2:
> args.append("-v")
>
> result = runner.invoke(cli, args, input=source)
>
> debug_log_format = "[\033[37m+\033[0m]"
> unchanged_log_format = "[\033[32m+\033[0m]"
> info_log_format = "[\033[36m+\033[0m]"
> # Check that changes are printed at info level
> > assert (f"{info_log_format} Fixed <stdin>" in result.stderr) ==
> > requires_fixing
> E AssertionError: assert ('[\x1b[36m+\x1b[0m] Fixed <stdin>' in
> '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n') == True
> E + where '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n' = <Result
> PydanticDeprecatedSince20('The `dict` method is deprecated; use `model_dump`
> instead.')>.stderr
>
> tests/e2e/test_cli.py:154: AssertionError
> _________________________ test_verbose_option[2-True]
> __________________________
> [gw2] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7fb72d045400>, verbose = 2
> requires_fixing = True
>
> @pytest.mark.secondary()
> @pytest.mark.parametrize(
> ("verbose", "requires_fixing"), product([0, 1, 2], [True, False])
> )
> def test_verbose_option(runner: CliRunner, verbose: int, requires_fixing:
> bool) -> None:
> """Prints debug level logs only when called with --verbose"""
> # Clear logging handlers for logs to work with CliRunner
> # For more info see https://github.com/pallets/click/issues/1053)
> logging.getLogger().handlers = []
> source = "program: yamlfix" if requires_fixing else "---\nprogram:
> yamlfix\n"
> args = ["-"]
> if verbose >= 1:
> args.append("--verbose")
> if verbose >= 2:
> args.append("-v")
>
> result = runner.invoke(cli, args, input=source)
>
> debug_log_format = "[\033[37m+\033[0m]"
> unchanged_log_format = "[\033[32m+\033[0m]"
> info_log_format = "[\033[36m+\033[0m]"
> # Check that changes are printed at info level
> > assert (f"{info_log_format} Fixed <stdin>" in result.stderr) ==
> > requires_fixing
> E AssertionError: assert ('[\x1b[36m+\x1b[0m] Fixed <stdin>' in
> '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n') == True
> E + where '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n' = <Result
> PydanticDeprecatedSince20('The `dict` method is deprecated; use `model_dump`
> instead.')>.stderr
>
> tests/e2e/test_cli.py:154: AssertionError
> ________________________ test_check_one_file_no_changes
> ________________________
> [gw4] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f2445148a10>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw4/test_check_one_file_no_changes0')
>
> def test_check_one_file_no_changes(runner: CliRunner, tmp_path: Path) ->
> None:
> """The --check flag is working with pending changes."""
> # ignore: call to untyped join method, they don't have type hints
> test_file_source = dedent(
> """\
> ---
> program: yamlfix
> """
> )
> test_file = tmp_path / "source.yaml"
> test_file.write_text(test_file_source)
>
> result = runner.invoke(cli, [str(test_file), "--check"])
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:212: AssertionError
> _____________________ test_sequence_style_env_enum_parsing
> _____________________
> [gw3] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7fb6c834c6e0>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw3/test_sequence_style_env_enum_p0')
>
> def test_sequence_style_env_enum_parsing(runner: CliRunner, tmp_path:
> Path) -> None:
> """Make sure that the enum-value can be parsed from string through an
> env var."""
> os.environ["YAMLFIX_SEQUENCE_STYLE"] = "block_style"
> os.environ["YAMLFIX_QUOTE_BASIC_VALUES"] = "false"
> test_source = dedent(
> """\
> list1: [item, item]
> list2:
> - item
> - item
> """
> )
> test_source_file = tmp_path / "source.yaml"
> test_source_file.write_text(test_source)
>
> result = runner.invoke(cli, [str(test_source_file)])
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:347: AssertionError
> ________________________ test_corrects_code_from_stdin
> _________________________
> [gw0] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f5f23e47d10>
>
> def test_corrects_code_from_stdin(runner: CliRunner) -> None:
> """Correct the source code passed as stdin."""
> source = "program: yamlfix"
> fixed_source = dedent(
> """\
> ---
> program: yamlfix
> """
> )
>
> result = runner.invoke(cli, ["-"], input=source)
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:86: AssertionError
> _____________________________ test_config_parsing
> ______________________________
> [gw4] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f244514bc80>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw4/test_config_parsing0')
>
> def test_config_parsing(runner: CliRunner, tmp_path: Path) -> None:
> """Provided config options are parsed, merged, and applied
> correctly."""
> os.environ["YAMLFIX_CONFIG_PATH"] = str(tmp_path)
> pyproject_config = dedent(
> """\
> [tool.yamlfix]
> line_length = 90
> quote_basic_values = "true"
> """
> )
> pyproject_config_file = tmp_path / "pyproject.toml"
> pyproject_config_file.write_text(pyproject_config)
> toml_config = dedent(
> """\
> none_representation = "null"
> quote_representation = '"'
> """
> )
> toml_config_file = tmp_path / "yamlfix.toml"
> toml_config_file.write_text(toml_config)
>
> # the ini config is currenlty parsed incorrectly and it is not
> possible to provide
> # a top level config option with it:
> https://github.com/dbatten5/maison/issues/199
> ini_config = dedent(
> """\
> [DEFAULT]
> quote_representation = "'"
>
> [yamlfix]
> none_representation = "~"
> """
> )
> ini_config_file = tmp_path / "yamlfix.ini"
> ini_config_file.write_text(ini_config)
> test_source = dedent(
> f"""\
> ---
> really_long_string: >
> {("abcdefghij " * 10).strip()}
> single_quoted_string: 'value1'
> double_quoted_string: "value2"
> unquoted_string: value3
> none_value:
> none_value2: ~
> none_value3: null
> none_value4: NULL
> """
> )
> test_source_file = tmp_path / "source.yaml"
> test_source_file.write_text(test_source)
>
> # we have to provide the pyproject.toml as a relative path to
> YAMLFIX_CONFIG_PATH
> # until this is fixed: https://github.com/dbatten5/maison/issues/141
> pyproject_config_file_name = "pyproject.toml"
>
> result = runner.invoke(
> cli,
> [
> "--config-file",
> pyproject_config_file_name,
> "--config-file",
> str(toml_config_file),
> "-c",
> str(ini_config_file),
> str(test_source_file),
> ],
> )
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:284: AssertionError
> _________________________ test_verbose_option[2-False]
> _________________________
> [gw2] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7fb72d047290>, verbose = 2
> requires_fixing = False
>
> @pytest.mark.secondary()
> @pytest.mark.parametrize(
> ("verbose", "requires_fixing"), product([0, 1, 2], [True, False])
> )
> def test_verbose_option(runner: CliRunner, verbose: int, requires_fixing:
> bool) -> None:
> """Prints debug level logs only when called with --verbose"""
> # Clear logging handlers for logs to work with CliRunner
> # For more info see https://github.com/pallets/click/issues/1053)
> logging.getLogger().handlers = []
> source = "program: yamlfix" if requires_fixing else "---\nprogram:
> yamlfix\n"
> args = ["-"]
> if verbose >= 1:
> args.append("--verbose")
> if verbose >= 2:
> args.append("-v")
>
> result = runner.invoke(cli, args, input=source)
>
> debug_log_format = "[\033[37m+\033[0m]"
> unchanged_log_format = "[\033[32m+\033[0m]"
> info_log_format = "[\033[36m+\033[0m]"
> # Check that changes are printed at info level
> assert (f"{info_log_format} Fixed <stdin>" in result.stderr) ==
> requires_fixing
> if verbose == 0:
> assert debug_log_format not in result.stderr
> assert unchanged_log_format not in result.stderr
> if verbose >= 1:
> # If no changes are required, unchanged log should not be printed
> > assert (unchanged_log_format in result.stderr) != requires_fixing
> E AssertionError: assert ('[\x1b[32m+\x1b[0m]' in
> '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n') != False
> E + where '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n' = <Result
> PydanticDeprecatedSince20('The `dict` method is deprecated; use `model_dump`
> instead.')>.stderr
>
> tests/e2e/test_cli.py:160: AssertionError
> _______________________________ test_find_files
> ________________________________
> [gw3] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7fb6c83222a0>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw3/test_find_files0')
>
> def test_find_files(runner: CliRunner, tmp_path: Path) -> None:
> """Correct the source code of multiple files."""
> test_files = []
> (tmp_path / ".hidden").mkdir()
> for filename in [
> "test.yaml",
> "test.yml",
> ".test.yaml",
> ".test.yml",
> ".hidden/test.yaml",
> ]:
> file_path = tmp_path / filename
> file_path.write_text("program: yamlfix")
> test_files.append(file_path)
> fixed_source = dedent(
> """\
> ---
> program: yamlfix
> """
> )
>
> result = runner.invoke(cli, [str(tmp_path)])
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:384: AssertionError
> _________________________ test_verbose_option[1-True]
> __________________________
> [gw1] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f14cd00fe90>, verbose = 1
> requires_fixing = True
>
> @pytest.mark.secondary()
> @pytest.mark.parametrize(
> ("verbose", "requires_fixing"), product([0, 1, 2], [True, False])
> )
> def test_verbose_option(runner: CliRunner, verbose: int, requires_fixing:
> bool) -> None:
> """Prints debug level logs only when called with --verbose"""
> # Clear logging handlers for logs to work with CliRunner
> # For more info see https://github.com/pallets/click/issues/1053)
> logging.getLogger().handlers = []
> source = "program: yamlfix" if requires_fixing else "---\nprogram:
> yamlfix\n"
> args = ["-"]
> if verbose >= 1:
> args.append("--verbose")
> if verbose >= 2:
> args.append("-v")
>
> result = runner.invoke(cli, args, input=source)
>
> debug_log_format = "[\033[37m+\033[0m]"
> unchanged_log_format = "[\033[32m+\033[0m]"
> info_log_format = "[\033[36m+\033[0m]"
> # Check that changes are printed at info level
> > assert (f"{info_log_format} Fixed <stdin>" in result.stderr) ==
> > requires_fixing
> E AssertionError: assert ('[\x1b[36m+\x1b[0m] Fixed <stdin>' in
> '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n') == True
> E + where '[\x1b[36m+\x1b[0m] YamlFix: Fixing files\n' = <Result
> PydanticDeprecatedSince20('The `dict` method is deprecated; use `model_dump`
> instead.')>.stderr
>
> tests/e2e/test_cli.py:154: AssertionError
> __________________________ test_ignores_correct_files
> __________________________
> [gw2] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7fb72d079910>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw2/test_ignores_correct_files0')
> caplog = <_pytest.logging.LogCaptureFixture object at 0x7fb72d0799a0>
>
> def test_ignores_correct_files(
> runner: CliRunner, tmp_path: Path, caplog: LogCaptureFixture
> ) -> None:
> """Correct the source code of an already correct file."""
> # ignore: call to untyped join method, they don't have type hints
> caplog.set_level(logging.DEBUG)
> test_file = tmp_path / "source.yaml"
> test_file.write_text("---\na: 1\n")
>
> result = runner.invoke(cli, [str(test_file)])
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:176: AssertionError
> ------------------------------ Captured log call
> -------------------------------
> [[36m+[0m] YamlFix: Fixing files
> ___________________ test_read_prefixed_environment_variables
> ___________________
> [gw4] linux -- Python 3.12.4 /usr/bin/python3.12
>
> runner = <click.testing.CliRunner object at 0x7f24451de690>
> tmp_path =
> PosixPath('/tmp/pytest-of-user42/pytest-1/popen-gw4/test_read_prefixed_environment0')
>
> def test_read_prefixed_environment_variables(runner: CliRunner, tmp_path:
> Path) -> None:
> """Make sure environment variables are parsed into the config
> object"""
> os.environ["YAMLFIX_TEST_NONE_REPRESENTATION"] = "~"
> test_source = dedent(
> """\
> none_value:
> none_value2: ~
> none_value3: null
> none_value4: NULL
> """
> )
> test_source_file = tmp_path / "source.yaml"
> test_source_file.write_text(test_source)
>
> result = runner.invoke(cli, ["--env-prefix", "YAMLFIX_TEST",
> str(test_source_file)])
>
> > assert result.exit_code == 0
> E AssertionError: assert 1 == 0
> E + where 1 = <Result PydanticDeprecatedSince20('The `dict` method is
> deprecated; use `model_dump` instead.')>.exit_code
>
> tests/e2e/test_cli.py:318: AssertionError
> _____ TestFixCode.test_fixed_code_has_exactly_one_newline_at_end_of_file[]
> _____
> [gw1] linux -- Python 3.12.4 /usr/bin/python3.12
>
> cls = <class '_pytest.runner.CallInfo'>
> func = <function call_and_report.<locals>.<lambda> at 0x7f14ccf9b1a0>
> when = 'call'
> reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
>
> @classmethod
> def from_call(
> cls,
> func: Callable[[], TResult],
> when: Literal["collect", "setup", "call", "teardown"],
> reraise: type[BaseException] | tuple[type[BaseException], ...] | None
> = None,
> ) -> CallInfo[TResult]:
> """Call func, wrapping the result in a CallInfo.
>
> :param func:
> The function to call. Called without arguments.
> :type func: Callable[[], _pytest.runner.TResult]
> :param when:
> The phase in which the function is called.
> :param reraise:
> Exception or exceptions that shall propagate if raised by the
> function, instead of being wrapped in the CallInfo.
> """
> excinfo = None
> start = timing.time()
> precise_start = timing.perf_counter()
> try:
> > result: TResult | None = func()
>
> /usr/lib/python3/dist-packages/_pytest/runner.py:341:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> /usr/lib/python3/dist-packages/_pytest/runner.py:242: in <lambda>
> lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
> /usr/lib/python3/dist-packages/pluggy/_hooks.py:513: in __call__
> return self._hookexec(self.name, self._hookimpls.copy(), kwargs,
> firstresult)
> /usr/lib/python3/dist-packages/pluggy/_manager.py:120: in _hookexec
> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
> /usr/lib/python3/dist-packages/_pytest/threadexception.py:92: in
> pytest_runtest_call
> yield from thread_exception_runtest_hook()
> /usr/lib/python3/dist-packages/_pytest/threadexception.py:68: in
> thread_exception_runtest_hook
> yield
> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:95: in
> pytest_runtest_call
> yield from unraisable_exception_runtest_hook()
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
> with catch_unraisable_exception() as cm:
> try:
> yield
> finally:
> if cm.unraisable:
> if cm.unraisable.err_msg is not None:
> err_msg = cm.unraisable.err_msg
> else:
> err_msg = "Exception ignored in"
> msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
> msg += "".join(
> traceback.format_exception(
> cm.unraisable.exc_type,
> cm.unraisable.exc_value,
> cm.unraisable.exc_traceback,
> )
> )
> >
> > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
> E pytest.PytestUnraisableExceptionWarning: Exception
> ignored in: <_io.FileIO [closed]>
> E
> E Traceback (most recent call last):
> E File "/usr/lib/python3/dist-packages/ruyaml/error.py",
> line 65, in __init__
> E def __init__(self, name, index, line, column, buffer,
> pointer):
> E
> E ResourceWarning: unclosed file <_io.TextIOWrapper
> name='/tmp/pytest-of-user42/pytest-1/popen-gw1/test_include_exclude_files0/source_1.yaml'
> mode='r+' encoding='UTF-8'>
>
> /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85:
> PytestUnraisableExceptionWarning
> =========================== short test summary info
> ============================
> FAILED tests/e2e/test_cli.py::test_verbose_option[1-False] - AssertionError:
> ...
> FAILED tests/e2e/test_cli.py::test_include_exclude_files - AssertionError:
> as...
> FAILED tests/e2e/test_cli.py::test_corrects_one_file - AssertionError:
> assert...
> FAILED tests/e2e/test_cli.py::test_corrects_three_files - AssertionError:
> ass...
> FAILED tests/e2e/test_cli.py::test_verbose_option[0-True] - AssertionError:
> a...
> FAILED tests/e2e/test_cli.py::test_verbose_option[2-True] - AssertionError:
> a...
> FAILED tests/e2e/test_cli.py::test_check_one_file_no_changes -
> AssertionError...
> FAILED tests/e2e/test_cli.py::test_sequence_style_env_enum_parsing -
> Assertio...
> FAILED tests/e2e/test_cli.py::test_corrects_code_from_stdin -
> AssertionError:...
> FAILED tests/e2e/test_cli.py::test_config_parsing - AssertionError: assert 1
> ...
> FAILED tests/e2e/test_cli.py::test_verbose_option[2-False] - AssertionError:
> ...
> FAILED tests/e2e/test_cli.py::test_find_files - AssertionError: assert 1 == 0
> FAILED tests/e2e/test_cli.py::test_verbose_option[1-True] - AssertionError:
> a...
> FAILED tests/e2e/test_cli.py::test_ignores_correct_files - AssertionError:
> as...
> FAILED tests/e2e/test_cli.py::test_read_prefixed_environment_variables -
> Asse...
> FAILED
> tests/unit/test_services.py::TestFixCode::test_fixed_code_has_exactly_one_newline_at_end_of_file[]
> ======================== 16 failed, 123 passed in 1.52s
> ========================
> E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_yamlfix/build; python3.12 -m pytest
> tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12
> returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2024/07/28/python-yamlfix_1.16.0-1_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240728;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240728&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
--- End Message ---