deepgram / deepgram-python-sdk

Official Python SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
239 stars 63 forks source link

SyntaxError #288

Closed visla-libinlong closed 9 months ago

visla-libinlong commented 9 months ago

What is the current behavior?

SyntaxError: match, case? Is this python syntax?

Steps to reproduce

from deepgram import DeepgramClient, PrerecordedOptions

File "/home/lee/.pyenv/versions/3.8.17/envs/global38/lib/python3.8/site-packages/deepgram/init.py", line 9, in from .client import Deepgram, DeepgramClient File "/home/lee/.pyenv/versions/3.8.17/envs/global38/lib/python3.8/site-packages/deepgram/client.py", line 233 match self.parent: ^ SyntaxError: invalid syntax

https://github.com/deepgram/deepgram-python-sdk/blob/main/deepgram/client.py#L233

davidvonthenen commented 9 months ago

Hi @visla-libinlong

The v3 SDK does not support Python 3.8. The min version of Python supported is 3.10.

If you need 3.8 support, v2 is available.

davidvonthenen commented 9 months ago

If you still have issues, please let us know!

qubvel commented 8 months ago

Hi, thanks for the clarification, but what if am not able to update the Python version for my project? Should I drop Deepgram service then? Could you, please, motivate dropping support of python 3.8?

davidvonthenen commented 8 months ago

Hi @qubvel. Based on the current schedule, Python 3.8 Support will be End-Of-Life in the second half of this year.

Currently, 3.8, 3.9, and 3.10 are only receiving critical security fixes only. The recommended path for 3.8 is to try to migrate as soon as possible because there isn't much time left to potential being vulnerable to security issues. However, if you are interested in using 3.8 (and 3.9), the v2 version of the SDK is still available for use and just like Python 3.8, it will only be updated for security fixes (however we are entertaining significant bugs as well) since the SDK has been stable for some time now.

Starting with 3.10, there was enough restriction removed and feature enabled in this release that started to open doors for newer and more interesting capabilities in the SDK that would not be possible on these older versions. Python 3.10 was a good starting point to unlock more of these capabilities while still using older Python versions.

Screenshot 2024-03-05 at 13 53 53

If you want to discuss this further, please stop by Discord for a chat! EDIT: as in to discuss your particular use case.