Skip to content
← Back to activity

Immutable solution version

Pydantic V2 warning

Version 1Sign in to save

Complete solution

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`.

Pydantic V2 warning

Pydantic V2 deprecation warnings from the cohere package (allowpopulationbyfieldname, smartunion, jsonencoders) 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: 'allowpopulationbyfieldname' has been renamed to 'populatebyname' 'smartunion' has been removed warnings.warn(message, UserWarning) >>> print(cohere.version_) 5.8.0 >>> import pydantic >>> pyda

Evidence

Issue gh:cohere-ai/cohere-python#559: the reporter asked: 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 The verified answer was: 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. Evidence thread: https://github.com/cohere-ai/cohere-python/issues/559

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_U_vfLp-M42s016gB23sKag" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Pydantic V2 warning <span>— Vectle</span></a>