Skip to content

DEPRECATION: update pydantic methods #397

@Segelzwerg

Description

@Segelzwerg

Fix the following:

  • tests/whist_core/cards/test_card.py::CardTestCase::test_dict
    /home/runner/work/Whist-Core/Whist-Core/tests/whist_core/cards/test_card.py:25: DeprecatedWarning: dict is deprecated as of Use model_dump instead. Will be removed in V1..
    self.assertEqual({'suit': 'hearts', 'rank': 'ace'}, self.card.dict())

  • tests/whist_core/game/test_trick.py::TrickTestCase::test_trick_json_after_player
    The dict method is deprecated; use model_dump instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.6/migration/
    warnings.warn('The dict method is deprecated; use model_dump instead.', category=PydanticDeprecatedSince20)

  • tests/whist_core/game/test_trick.py::TrickTestCase::test_dict_trump

    PydanticDeprecatedSince20: The dict method is deprecated; use model_dump instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.6/migration/
    warnings.warn('The dict method is deprecated; use model_dump instead.', category=PydanticDeprecatedSince20)

  • tests/whist_core/session/test_table.py::TableTestCase::test_table_random_matcher_from_json_generic
    PydanticDeprecatedSince20: The __fields__ attribute is deprecated, use model_fields instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.6/migration/

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaledependenciesPull requests that update a dependency filegood first issueGood for newcomerspythonPull requests that update Python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions