Skip to content

fix: Changed union typing in client_ext.py from | operator to Union[] for compatibility with Python 3.9#470

Open
ellacroix wants to merge 1 commit intoHumanSignal:masterfrom
ellacroix:fix/python39_compatibility
Open

fix: Changed union typing in client_ext.py from | operator to Union[] for compatibility with Python 3.9#470
ellacroix wants to merge 1 commit intoHumanSignal:masterfrom
ellacroix:fix/python39_compatibility

Conversation

@ellacroix
Copy link
Copy Markdown

In the current release, this package doesnt work in Python 3.9 if you try to "from label_studio_sdk import Client", because of 2 functions definitions in client_ext.py that use the | operator for union typing, a feature that only works since Python 3.10 (https://peps.python.org/pep-0604/).

I replaced the | operator for union typing with Union[] typing, in 2 instances in client_ext.py.

Replaced | operator for union typing, which only works since Python 3.10, with Union[] typing.
@github-actions github-actions bot added the fix label May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant