Skip to content

Breaking Change: Cannot import name 'TraitValue' in v5.4.0 #223

Description

@callumnewlands

Renaming TraitValue to ContextValue in release v5.4.0 breaks compatibility with flagsmith v3.8.0 (and possibly later versions too) with the following error when running from flagsmith import Flagsmith:

...
   from flagsmith import Flagsmith
File "/root/.pyenv/versions/3.12.8/lib/python3.12/site-packages/flagsmith/__init__.py", line 1, in <module>
    from .flagsmith import Flagsmith
File "/root/.pyenv/versions/3.12.8/lib/python3.12/site-packages/flagsmith/flagsmith.py", line 11, in <module>
    from flag_engine.identities.traits.types import TraitValue
ImportError: cannot import name 'TraitValue' from 'flag_engine.identities.traits.types' (/root/.pyenv/versions/3.12.8/lib/python3.12/site-packages/flag_engine/identities/traits/types.py)

Not sure if this is better fixed here or in the flagsmith-python-client repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions