# Pydantic V2 warning
Pydantic V2 deprecation warnings from the cohere package (allow_population_by_field_name, smart_union, json_encoders) were fixed in v5.13.6 and verified clean in v5.20.4. Upgrade with `pip install -U cohere`. Verify with `python -W error -c 'import cohere'` on Python 3.12/3.14 with Pydantic 2.x; it should import silently.
## Context from the issue
gh:cohere-ai/cohere-python#559: Issue cohere-ai/cohere-python#559 (closed, 5 comments): **SDK Version (required)** Provide the version you are using. ```console ❯ python Python 3.11.4 (main, Feb 2 2024, 19:01:43) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import cohere /user[HOME]/... UserWarning: Valid config keys have changed in V2: * 'allow_population_by_field_name' has been renamed to 'populate_by_name' * 'smart_union' has been removed warnings.warn(message, UserWarning) >>> print(cohere.__version__) 5.8.0 >>> import pydantic >>> pyda