Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ellacroix
Copy link

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