Package: src:pydantic-settings
Version: 2.12.0-1
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202512/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:pydantic-settings, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
   dh_autoreconf_clean -O--buildsystem=pybuild
   dh_clean -O--buildsystem=pybuild
 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:131: Building wheel for python3.14 with "build" 
module
I: pybuild base:317: python3.14 -m build --skip-dependency-check --no-isolation 
--wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_pydantic-settings  
* Building wheel...
Successfully built pydantic_settings-2.12.0-py3-none-any.whl

[... snipped ...]

            m.setattr(sys, 'argv', ['example.py', '--help'])
    
            with pytest.raises(SystemExit):
                CliApp.run(Settings)
    
            if PYTHON_3_14:
                if IS_WINDOWS:
                    text = """usage: example.py [-h] [--visible_obj [JSON]]
                                [--visible_obj.visible_a int]
                                [--visible_obj.visible_b int]"""
                else:
                    text = """usage: example.py [-h] [--visible_obj [JSON]]
                             [--visible_obj.visible_a int]
                             [--visible_obj.visible_b int]"""
    
            else:
                text = """usage: example.py [-h] [--visible_obj [JSON]] 
[--visible_obj.visible_a int]
                      [--visible_obj.visible_b int]"""
>           assert (
                sanitize_cli_output(capsys.readouterr().out)
                == f"""{text}
    
    {ARGPARSE_OPTIONS_TEXT}:
      -h, --help            show this help message and exit
    
    visible_obj options:
      --visible_obj [JSON]  set visible_obj from JSON string (default: {{}})
      --visible_obj.visible_a int
                            (required)
      --visible_obj.visible_b int
                            (required)
    """
            )
E           AssertionError: assert 'usage: pytho... (required)\n' == 'usage: 
examp... (required)\n'
E             
E             - usage: example.py [-h] [--visible_obj [JSON]]
E             + usage: python3.14 -m pytest [-h] [--visible_obj [JSON]]
E             -                          [--visible_obj.visible_a int]
E             +                             [--visible_obj.visible_a int]
E             ? +++
E             -                          [--visible_obj.visible_b int]...
E             
E             ...Full output truncated (12 lines hidden), use '-vv' to show

tests/test_source_cli.py:2328: AssertionError
______________________ test_cli_mutually_exclusive_group _______________________

capsys = <_pytest.capture.CaptureFixture object at 0x7f5b76699bd0>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f5b766939a0>

    def test_cli_mutually_exclusive_group(capsys, monkeypatch):
        class Circle(CliMutuallyExclusiveGroup):
            radius: float | None = 21
            diameter: float | None = 22
            perimeter: float | None = 23
    
        class Settings(BaseModel):
            circle_optional: Circle = Circle(radius=None, diameter=None, 
perimeter=24)
            circle_required: Circle
    
        CliApp.run(Settings, cli_args=['--circle-required.radius=1', 
'--circle-optional.radius=1']).model_dump() == {
            'circle_optional': {'radius': 1, 'diameter': 22, 'perimeter': 24},
            'circle_required': {'radius': 1, 'diameter': 22, 'perimeter': 23},
        }
    
        with pytest.raises(SystemExit):
            CliApp.run(Settings, cli_args=['--circle-required.radius=1', 
'--circle-required.diameter=2'])
        assert (
            'error: argument --circle-required.diameter: not allowed with 
argument --circle-required.radius'
            in capsys.readouterr().err
        )
    
        with pytest.raises(SystemExit):
            CliApp.run(
                Settings,
                cli_args=['--circle-required.radius=1', 
'--circle-optional.radius=1', '--circle-optional.diameter=2'],
            )
        assert (
            'error: argument --circle-optional.diameter: not allowed with 
argument --circle-optional.radius'
            in capsys.readouterr().err
        )
    
        with monkeypatch.context() as m:
            m.setattr(sys, 'argv', ['example.py', '--help'])
            with pytest.raises(SystemExit):
                CliApp.run(Settings)
            if PYTHON_3_14:
                if IS_WINDOWS:
                    usage = """usage: example.py [-h] [--circle-optional.radius 
float |
                                --circle-optional.diameter float |
                                --circle-optional.perimeter float]
                                (--circle-required.radius float |
                                --circle-required.diameter float |
                                --circle-required.perimeter float)"""
                else:
                    usage = """usage: example.py [-h] [--circle-optional.radius 
float |
                             --circle-optional.diameter float |
                             --circle-optional.perimeter float]
                             (--circle-required.radius float |
                             --circle-required.diameter float |
                             --circle-required.perimeter float)"""
            elif sys.version_info >= (3, 13):
                usage = """usage: example.py [-h] [--circle-optional.radius 
float |
                      --circle-optional.diameter float |
                      --circle-optional.perimeter float]
                      (--circle-required.radius float |
                      --circle-required.diameter float |
                      --circle-required.perimeter float)"""
            else:
                usage = """usage: example.py [-h]
                      [--circle-optional.radius float | 
--circle-optional.diameter float | --circle-optional.perimeter float]
                      (--circle-required.radius float | 
--circle-required.diameter float | --circle-required.perimeter float)"""
>           assert (
                sanitize_cli_output(capsys.readouterr().out)
                == f"""{usage}
    
    {ARGPARSE_OPTIONS_TEXT}:
      -h, --help            show this help message and exit
    
    circle-optional options (mutually exclusive):
      --circle-optional.radius float
                            (default: None)
      --circle-optional.diameter float
                            (default: None)
      --circle-optional.perimeter float
                            (default: 24.0)
    
    circle-required options (mutually exclusive):
      --circle-required.radius float
                            (default: 21)
      --circle-required.diameter float
                            (default: 22)
      --circle-required.perimeter float
                            (default: 23)
    """
            )
E           AssertionError: assert 'usage: pytho...efault: 23)\n' == 'usage: 
examp...efault: 23)\n'
E             
E             - usage: example.py [-h] [--circle-optional.radius float |
E             ?        --------
E             + usage: python3.14 -m pytest [-h] [--circle-optional.radius 
float |
E             ?          ++++++++++++++++++
E             -                          --circle-optional.diameter float |
E             +                             --circle-optional.diameter float 
|...
E             
E             ...Full output truncated (32 lines hidden), use '-vv' to show

tests/test_source_cli.py:2407: AssertionError
_____________________________ test_cli_kebab_case ______________________________

capsys = <_pytest.capture.CaptureFixture object at 0x7f5b75ee8410>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f5b75b9e660>

    def test_cli_kebab_case(capsys, monkeypatch):
        class DeepSubModel(BaseModel):
            deep_pos_arg: CliPositionalArg[str]
            deep_arg: str
    
        class SubModel(BaseModel):
            sub_subcmd: CliSubCommand[DeepSubModel]
            sub_other_subcmd: CliSubCommand[DeepSubModel]
            sub_arg: str
    
        class Root(BaseModel):
            root_subcmd: CliSubCommand[SubModel]
            other_subcmd: CliSubCommand[SubModel]
            root_arg: str
    
        root = CliApp.run(
            Root,
            cli_args=[
                '--root-arg=hi',
                'root-subcmd',
                '--sub-arg=hello',
                'sub-subcmd',
                'hey',
                '--deep-arg=bye',
            ],
        )
        assert root.model_dump() == {
            'root_arg': 'hi',
            'other_subcmd': None,
            'root_subcmd': {
                'sub_arg': 'hello',
                'sub_subcmd': {'deep_pos_arg': 'hey', 'deep_arg': 'bye'},
                'sub_other_subcmd': None,
            },
        }
    
        serialized_cli_args = CliApp.serialize(root)
        assert serialized_cli_args == [
            '--root-arg',
            'hi',
            'root-subcmd',
            '--sub-arg',
            'hello',
            'sub-subcmd',
            '--deep-arg',
            'bye',
            'hey',
        ]
    
        with monkeypatch.context() as m:
            m.setattr(sys, 'argv', ['example.py', '--help'])
            with pytest.raises(SystemExit):
                CliApp.run(Root)
>           assert (
                sanitize_cli_output(capsys.readouterr().out)
                == f"""usage: example.py [-h] --root-arg str 
{{root-subcmd,other-subcmd}} ...
    
    {ARGPARSE_OPTIONS_TEXT}:
      -h, --help            show this help message and exit
      --root-arg str        (required)
    
    subcommands:
      {{root-subcmd,other-subcmd}}
        root-subcmd
        other-subcmd
    """
            )
E           AssertionError: assert 'usage: pytho...ther-subcmd\n' == 'usage: 
examp...ther-subcmd\n'
E             
E             - usage: example.py [-h] --root-arg str 
{root-subcmd,other-subcmd} ...
E             ?        --------
E             + usage: python3.14 -m pytest [-h] --root-arg str 
{root-subcmd,other-subcmd} ...
E             ?          ++++++++++++++++++
E               
E               options:...
E             
E             ...Full output truncated (7 lines hidden), use '-vv' to show

tests/test_source_cli.py:2604: AssertionError
=========================== short test summary info ============================
FAILED tests/test_source_cli.py::test_cli_alias_subcommand_and_positional_args
FAILED tests/test_source_cli.py::test_cli_help_differentiation - AssertionErr...
FAILED tests/test_source_cli.py::test_cli_help_string_format - AssertionError...
FAILED tests/test_source_cli.py::test_cli_help_union_of_models - AssertionErr...
FAILED tests/test_source_cli.py::test_cli_help_default_or_none_model - Assert...
FAILED tests/test_source_cli.py::test_cli_subcommand_union - AssertionError: ...
FAILED tests/test_source_cli.py::test_cli_enums - AssertionError: assert 'usa...
FAILED tests/test_source_cli.py::test_cli_avoid_json - AssertionError: assert...
FAILED tests/test_source_cli.py::test_cli_remove_empty_groups - AssertionErro...
FAILED tests/test_source_cli.py::test_cli_hide_none_type - AssertionError: as...
FAILED tests/test_source_cli.py::test_cli_use_class_docs_for_groups - Asserti...
FAILED tests/test_source_cli.py::test_cli_exit_on_error - AssertionError: ass...
FAILED tests/test_source_cli.py::test_cli_suppress - AssertionError: assert '...
FAILED tests/test_source_cli.py::test_cli_mutually_exclusive_group - Assertio...
FAILED tests/test_source_cli.py::test_cli_kebab_case - AssertionError: assert...
================== 15 failed, 391 passed, 21 skipped in 1.82s ==================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_pydantic-settings/build; python3.14 -m 
pytest tests
I: pybuild base:317: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pydantic-settings/build; python3.13 -m 
pytest tests
============================= test session starts ==============================
platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pydantic-settings/build
configfile: pyproject.toml
plugins: typeguard-4.4.4, mock-3.15.1, anyio-4.11.0
collected 425 items / 2 skipped

tests/test_precedence_and_merging.py ......                              [  1%]
tests/test_settings.py ................................................. [ 12%]
........................................................................ [ 29%]
.........................................................                [ 43%]
tests/test_source_azure_key_vault.py ......                              [ 44%]
tests/test_source_cli.py ............................................... [ 55%]
................s......ss............................................... [ 72%]
.....................................                                    [ 81%]
tests/test_source_gcp_secret_manager.py sssssssssssssss                  [ 84%]
tests/test_source_json.py ....                                           [ 85%]
tests/test_source_nested_secrets.py ...............................      [ 93%]
tests/test_source_pyproject_toml.py ................                     [ 96%]
tests/test_source_toml.py ....                                           [ 97%]
tests/test_source_yaml.py .s......                                       [ 99%]
tests/test_utils.py .                                                    [100%]

======================= 406 passed, 21 skipped in 1.40s ========================
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 
3.13" returned exit code 13
make: *** [debian/rules:15: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

Reply via email to