Package: src:python-djantic Version: 0.7.0-6 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:python-djantic, so that this is still visible in the BTS web page for this package. Thanks. -------------------------------------------------------------------------------- [...] debian/rules clean dh clean --with mkdocs --buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild dh_autoreconf_clean -O--buildsystem=pybuild dh_clean -O--buildsystem=pybuild debian/rules execute_after_dh_clean make[1]: Entering directory '/<<PKGBUILDDIR>>' rm -rf html make[1]: Leaving directory '/<<PKGBUILDDIR>>' debian/rules binary dh binary --with mkdocs --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 [... snipped ...] @pytest.mark.django_db def test_m2m_reverse(): class ExpertSchema(ModelSchema): class Config: model = Expert class CaseSchema(ModelSchema): class Config: model = Case assert ExpertSchema.schema() == { "title": "ExpertSchema", "description": "Expert(id, name)", "type": "object", "properties": { "id": {"title": "Id", "description": "id", "type": "integer"}, "name": { "title": "Name", "description": "name", "maxLength": 128, "type": "string", }, "cases": { "title": "Cases", "description": "id", "type": "array", "items": { "type": "object", "additionalProperties": {"type": "integer"}, }, }, }, "required": ["name", "cases"], } assert CaseSchema.schema() == { "title": "CaseSchema", "description": "Case(id, name, details)", "type": "object", "properties": { "related_experts": { "title": "Related Experts", "description": "id", "type": "array", "items": { "type": "object", "additionalProperties": {"type": "integer"}, }, }, "id": {"title": "Id", "description": "id", "type": "integer"}, "name": { "title": "Name", "description": "name", "maxLength": 128, "type": "string", }, "details": {"title": "Details", "description": "details", "type": "string"}, }, "required": ["name", "details"], } case = Case.objects.create(name="My Case", details="Some text data.") expert = Expert.objects.create(name="My Expert") case_schema = CaseSchema.from_django(case) expert_schema = ExpertSchema.from_django(expert) assert case_schema.dict() == { "related_experts": [], "id": 1, "name": "My Case", "details": "Some text data.", } assert expert_schema.dict() == {"id": 1, "name": "My Expert", "cases": []} expert.cases.add(case) case_schema = CaseSchema.from_django(case) expert_schema = ExpertSchema.from_django(expert) assert case_schema.dict() == { "related_experts": [{"id": 1}], "id": 1, "name": "My Case", "details": "Some text data.", } assert expert_schema.dict() == {"id": 1, "name": "My Expert", "cases": [{"id": 1}]} class CustomExpertSchema(ModelSchema): """Custom schema""" name: Optional[str] class Config: model = Expert class CaseSchema(ModelSchema): related_experts: List[CustomExpertSchema] class Config: model = Case > assert CaseSchema.schema() == { "title": "CaseSchema", "description": "Case(id, name, details)", "type": "object", "properties": { "related_experts": { "title": "Related Experts", "type": "array", "items": {"$ref": "#/definitions/CustomExpertSchema"}, }, "id": {"title": "Id", "description": "id", "type": "integer"}, "name": { "title": "Name", "description": "name", "maxLength": 128, "type": "string", }, "details": {"title": "Details", "description": "details", "type": "string"}, }, "required": ["related_experts", "name", "details"], "definitions": { "CustomExpertSchema": { "title": "CustomExpertSchema", "description": "Custom schema", "type": "object", "properties": { "id": {"title": "Id", "description": "id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "cases": { "title": "Cases", "description": "id", "type": "array", "items": { "type": "object", "additionalProperties": {"type": "integer"}, }, }, }, "required": ["cases"], } }, } E AssertionError: assert {'description...eSchema', ...} == {'definitions...etails'], ...} E E Omitting 3 identical items, use -vv to show E Differing items: E {'properties': {'details': {'description': 'details', 'title': 'Details', 'type': 'string'}, 'id': {'description': 'id...items': {'additionalProperties': {'type': 'integer'}, 'type': 'object'}, 'title': 'Related Experts', 'type': 'array'}}} != {'properties': {'details': {'description': 'details', 'title': 'Details', 'type': 'string'}, 'id': {'description': 'id...elated_experts': {'items': {'$ref': '#/definitions/CustomExpertSchema'}, 'title': 'Related Experts', 'type': 'array'}}} E {'required': ['name', 'details']}... E E ...Full output truncated (90 lines hidden), use '-vv' to show tests/test_relations.py:807: AssertionError ________________________ test_include_from_annotations _________________________ @pytest.mark.django_db def test_include_from_annotations(): """ Test include="__annotations__" config. """ class ProfileSchema(ModelSchema): website: str class Config: model = Profile include = "__annotations__" > assert ProfileSchema.schema() == { "title": "ProfileSchema", "description": "A user's profile.", "type": "object", "properties": { "website": { "title": "Website", "type": "string" } }, "required": [ "website" ] } E AssertionError: assert {'description...eSchema', ...} == {'description...eSchema', ...} E E Omitting 3 identical items, use -vv to show E Differing items: E {'properties': {'id': {'description': 'id', 'title': 'Id', 'type': 'integer'}, 'location': {'default': '', 'descriptio..., 'type': 'integer'}, 'website': {'default': '', 'description': 'website', 'maxLength': 200, 'title': 'Website', ...}}} != {'properties': {'website': {'title': 'Website', 'type': 'string'}}} E {'required': ['user']} != {'required': ['website']} E E Full diff:... E E ...Full output truncated (35 lines hidden), use '-vv' to show tests/test_schemas.py:398: AssertionError =============================== warnings summary =============================== ../../../../../../usr/lib/python3/dist-packages/django/conf/__init__.py:267 /usr/lib/python3/dist-packages/django/conf/__init__.py:267: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale. warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) djantic/main.py:12 /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_djantic/build/djantic/main.py:12: UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater. from pydantic.v1 import BaseModel, ConfigError, create_model -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ============================= slowest 10 durations ============================= 0.15s setup tests/test_fields.py::test_unhandled_field_type 0.01s call tests/test_relations.py::test_m2m_reverse (8 durations < 0.005s hidden. Use -vv to show these durations.) =========================== short test summary info ============================ FAILED tests/test_queries.py::test_get_instance_with_generic_foreign_key - As... FAILED tests/test_queries.py::test_get_queryset_with_reverse_one_to_one - Ass... FAILED tests/test_queries.py::test_get_queryset_with_foreign_key - AssertionE... FAILED tests/test_queries.py::test_get_queryset_with_reverse_foreign_key - As... FAILED tests/test_relations.py::test_m2m - AssertionError: assert {'descripti... FAILED tests/test_relations.py::test_foreign_key - AssertionError: assert {'d... FAILED tests/test_relations.py::test_one_to_one - AssertionError: assert {'de... FAILED tests/test_relations.py::test_one_to_one_reverse - AssertionError: ass... FAILED tests/test_relations.py::test_generic_relation - pydantic.v1.errors.Co... FAILED tests/test_relations.py::test_m2m_reverse - AssertionError: assert {'d... FAILED tests/test_schemas.py::test_include_from_annotations - AssertionError:... =========== 11 failed, 17 passed, 4 deselected, 2 warnings in 0.47s ============ E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.14_djantic/build; python3.14 -m pytest -k ' not test_multiple_level_relations and not test_alias and not test_annotations and not test_sub_model' I: pybuild base:317: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_djantic/build; python3.13 -m pytest -k ' not test_multiple_level_relations and not test_alias and not test_annotations and not test_sub_model' ============================= test session starts ============================== platform linux -- Python 3.13.11, pytest-9.0.2, pluggy-1.6.0 -- /usr/bin/python3.13 cachedir: .pytest_cache django: version: 4.2.26, settings: tests.testapp.settings (from ini) rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_djantic/build configfile: setup.cfg plugins: Faker-33.3.1, django-4.11.1 collecting ... collected 32 items / 4 deselected / 28 selected tests/test_fields.py::test_unhandled_field_type Creating test database for alias 'default'... <class 'django.contrib.postgres.search.SearchVectorField'> is currently unhandled, defaulting to str. PASSED tests/test_fields.py::test_custom_field PASSED tests/test_fields.py::test_postgres_json_field PASSED tests/test_fields.py::test_lazy_choice_field PASSED tests/test_fields.py::test_enum_choices PASSED tests/test_fields.py::test_enum_choices_generates_unique_enums PASSED tests/test_fields.py::test_listing PASSED tests/test_files.py::test_image_field_schema PASSED tests/test_main.py::test_config_errors PASSED tests/test_main.py::test_get_field_names PASSED tests/test_queries.py::test_get_instance PASSED tests/test_queries.py::test_get_instance_with_generic_foreign_key PASSED tests/test_queries.py::test_get_queryset_with_reverse_one_to_one PASSED tests/test_queries.py::test_get_queryset_with_foreign_key PASSED tests/test_queries.py::test_get_queryset_with_reverse_foreign_key PASSED tests/test_queries.py::test_get_queryset_with_generic_foreign_key PASSED tests/test_relations.py::test_m2m PASSED tests/test_relations.py::test_foreign_key PASSED tests/test_relations.py::test_one_to_one PASSED tests/test_relations.py::test_one_to_one_reverse PASSED tests/test_relations.py::test_generic_relation PASSED tests/test_relations.py::test_m2m_reverse PASSED tests/test_schemas.py::test_description PASSED tests/test_schemas.py::test_cache PASSED tests/test_schemas.py::test_include_exclude PASSED tests/test_schemas.py::test_json PASSED tests/test_schemas.py::test_include_from_annotations PASSED tests/test_schemas.py::test_by_alias_generator PASSEDDestroying test database for alias 'default'... =============================== warnings summary =============================== ../../../../../../usr/lib/python3/dist-packages/django/conf/__init__.py:267 /usr/lib/python3/dist-packages/django/conf/__init__.py:267: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale. warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ============================= slowest 10 durations ============================= 0.15s setup tests/test_fields.py::test_unhandled_field_type 0.01s call tests/test_relations.py::test_m2m_reverse (8 durations < 0.005s hidden. Use -vv to show these durations.) ================= 28 passed, 4 deselected, 1 warning in 0.34s ================== I: pybuild pybuild:334: rm -rf /<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_djantic/build/.pytest_cache/ dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.14 3.13" returned exit code 13 make: *** [debian/rules:16: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 --------------------------------------------------------------------------------

