Package: src:pydantic-compat
Version: 0.1.2-3
Severity: serious
Tags: ftbfs forky sid

Dear maintainer:

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

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

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

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 could not 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-compat, 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:129: Building wheel for python3.13 with "build" 
module
I: pybuild base:311: python3.13 -m build --skip-dependency-check --no-isolation 
--wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pydantic-compat  
* Building wheel...
Successfully built pydantic_compat-0.1.2-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.13 with 
"installer" module
   dh_auto_test -O--buildsystem=pybuild
I: pybuild base:311: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pydantic-compat/build; python3.13 -m 
pytest tests
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.4.1, pluggy-1.6.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pydantic-compat/build
configfile: pyproject.toml
plugins: typeguard-4.4.4
collected 25 items

tests/test_base_model.py ..FF...                                         [ 28%]
tests/test_decorators.py ...xF                                           [ 48%]
tests/test_fields.py .............                                       [100%]

=================================== FAILURES ===================================
______________________________ test_v1_attributes ______________________________

    def test_v1_attributes():
        m = Model()
>       assert "x" in m.__fields__
                      ^^^^^^^^^^^^

tests/test_base_model.py:58: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pydantic_compat/_v2/mixin.py:96: in __fields__
    return self.model_fields
           ^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pydantic._internal._utils.deprecated_instance_property object at 
0x7f3e02c65400>
instance = Model(x=1), objtype = <class 'test_base_model.Model'>

    def __get__(self, instance: _ModelT | None, objtype: type[_ModelT]) -> _RT:
        if instance is not None:
            attr_name = self.fget.__name__ if sys.version_info >= (3, 10) else 
self.fget.__func__.__name__
>           warnings.warn(
                f'Accessing the {attr_name!r} attribute on the instance is 
deprecated. '
                'Instead, you should access this attribute from the model 
class.',
                category=PydanticDeprecatedSince211,
                stacklevel=2,
            )
E           pydantic.warnings.PydanticDeprecatedSince211: Accessing the 
'model_fields' attribute on the instance is deprecated. Instead, you should 
access this attribute from the model class. Deprecated in Pydantic V2.11 to be 
removed in V3.0.

/usr/lib/python3/dist-packages/pydantic/_internal/_utils.py:430: 
PydanticDeprecatedSince211
______________________________ test_v2_attributes ______________________________

    def test_v2_attributes():
        m = Model()
>       assert "x" in m.model_fields
                      ^^^^^^^^^^^^^^

tests/test_base_model.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pydantic._internal._utils.deprecated_instance_property object at 
0x7f3e02c65400>
instance = Model(x=1), objtype = <class 'test_base_model.Model'>

    def __get__(self, instance: _ModelT | None, objtype: type[_ModelT]) -> _RT:
        if instance is not None:
            attr_name = self.fget.__name__ if sys.version_info >= (3, 10) else 
self.fget.__func__.__name__
>           warnings.warn(
                f'Accessing the {attr_name!r} attribute on the instance is 
deprecated. '
                'Instead, you should access this attribute from the model 
class.',
                category=PydanticDeprecatedSince211,
                stacklevel=2,
            )
E           pydantic.warnings.PydanticDeprecatedSince211: Accessing the 
'model_fields' attribute on the instance is deprecated. Instead, you should 
access this attribute from the model class. Deprecated in Pydantic V2.11 to be 
removed in V3.0.

/usr/lib/python3/dist-packages/pydantic/_internal/_utils.py:430: 
PydanticDeprecatedSince211
___________________________ test_v2_model_validator ____________________________

    def test_v2_model_validator():
        mock_before = Mock()
        mock_after = Mock()
        mock_after_cm = Mock()
    
        class Model(PydanticCompatMixin, pydantic.BaseModel):
            x: int = 1
    
            @model_validator(mode="before")
            def _validate_x_before(cls, v):
                mock_before(v)
                return v
    
            @model_validator(mode="after")
            def _validate_x_after(cls, v):
                mock_after(v)
                return v
    
            # this also needs to work
            @model_validator(mode="after")
            @classmethod
            def _validate_x_after_cm(cls, v):
                mock_after_cm(v)
                return v
    
>       m = Model(x="2")
            ^^^^^^^^^^^^
E       UserWarning: A custom validator is returning a value other than `self`.
E       Returning anything other than `self` from a top level model validator 
isn't supported when validating via `__init__`.
E       See the `model_validator` docs 
(https://docs.pydantic.dev/latest/concepts/validators/#model-validators) for 
more details.

tests/test_decorators.py:134: UserWarning
=========================== short test summary info ============================
FAILED tests/test_base_model.py::test_v1_attributes - pydantic.warnings.Pydan...
FAILED tests/test_base_model.py::test_v2_attributes - pydantic.warnings.Pydan...
FAILED tests/test_decorators.py::test_v2_model_validator - UserWarning: A cus...
=================== 3 failed, 21 passed, 1 xfailed in 0.12s ====================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd 
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_pydantic-compat/build; python3.13 -m 
pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 
returned exit code 13
make: *** [debian/rules:6: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

Reply via email to