surrealdb.py icon indicating copy to clipboard operation
surrealdb.py copied to clipboard

Supported python versions

Open CaedenPH opened this issue 2 years ago • 6 comments

Description

What are your opinions on the python versions that should be supported by this library?

Asking this question due to the usage of deprecated typehinting annotations such as typing.List and typing.Tuple - what are our plans to support/update these annotations?

Is there an existing issue for this?

  • [X] I have searched the existing issues

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

CaedenPH avatar Apr 03 '23 15:04 CaedenPH

That is a good point. Currently, we are supporting Python 3.7 and above, which seems to be the most common minimum version for other database libraries as well 🤔

Not sure at the moment what the best way would be. Do you have any thoughts on how what we should do?

AlexFrid avatar Apr 03 '23 16:04 AlexFrid

That is a good point. Currently, we are supporting Python 3.7 and above, which seems to be the most common minimum version for other database libraries as well 🤔

Not sure at the moment what the best way would be. Do you have any thoughts on how what we should do?

I'm not entirely sure what the plan going forward should be. Personally, I would only support version 3.10+ however this is very controversial and I wouldn't recommend it for a public library such as this - For now I see no problem just ignoring the typing deprecations until most systems are running 3.10+

CaedenPH avatar Apr 03 '23 17:04 CaedenPH

Yeah, that is indeed quite controversial 😅 I'm sure there are a lot of enterprises still on Python 3.7 since its still widely supported in other similar libraries We'll then just ignore it for now then 👍

AlexFrid avatar Apr 03 '23 17:04 AlexFrid

Yeah, that is indeed quite controversial 😅 I'm sure there are a lot of enterprises still on Python 3.7 since its still widely supported in other similar libraries We'll then just ignore it for now then 👍

I'll keep this open for discussion but you can mark it as stale if you want

CaedenPH avatar Apr 03 '23 17:04 CaedenPH

I don't believe that the typing module is going to be deprecated? It is needed to support all versions of Python, including 3.10. However, end of life for Python 3.7 is planned for this year.

Before we make a decision, further testing should be done on all versions of Python and OS (can be done this GitHub actions) to see if our clients work with versions 3.7+. I have noted that many libraries have already stopped supporting 3.7 in their latest releases.

Ce11an avatar Apr 11 '23 22:04 Ce11an

FYI: official tracking for the status of major Python versions is available here:

  • https://devguide.python.org/versions/

Python 3.7 has been "End of life" for a while. Python 3.8 will not be "End of life" until October 2024.

As for typing specifically, import of __future__ annotations can allow for upgrading to the more "modern" typing for all Python versions (no need to limit that to >= 3.10).

alexander-beedie avatar Mar 20 '24 08:03 alexander-beedie