chore: replace attrs usage with pydantic dataclasses (#3459)