pyteal icon indicating copy to clipboard operation
pyteal copied to clipboard

Latest Supported Python Version

Open efe opened this issue 2 years ago • 1 comments

The latest supported python version is 3.10. https://github.com/algorand/pyteal/blob/master/setup.py#L30

Python 3.10 is just 11 months old. Python 3.8 will be maintained to 14 Oct 2024 (more than 2 years!) https://endoflife.date/python

Since none of the package dependency have this requirement and the package does not use any new python features as far as I see. Why do we have this?

Most of mature projects are still exists in Python 3.9 or Python 3.8. This makes hard to use pyteal as dependency in these projects.

efe avatar Sep 12 '22 14:09 efe

@efe Let me know if the response addresses the concern?

I can appreciate that it's an inconvenience from a builder's perspective. As maintainers, the tradeoff is that we leverage recent Python capabilities (e.g. pattern matching, typing additions) in order to reduce chance of error.

I'm not sure if you've seen it: the project README (https://github.com/algorand/pyteal#install) points to ways to manage multiple Python installations locally.

michaeldiamant avatar Sep 13 '22 18:09 michaeldiamant

I see that you'd like to use latest features of Python. But I think that this is too early for builder perspective. I can make my codebase compatible with Python 3.10. However, It might be impossible for my other dependencies.

I think that packages or frameworks (not end products) should follow Python requirement not that close.

efe avatar Oct 04 '22 10:10 efe

@efe I can appreciate the perspective you're presenting and it's a primary driver for a slower upgrade path in py-algorand-sdk (https://github.com/algorand/py-algorand-sdk/#supported-python-versions).

In pyteal, we applied a different tradeoff because pyteal's problem domain benefits from recent language developments. We're attempting to balance correctness + flexibility for builders. It's understood that some incompatibilities may exist though we obviously hope it's infrequent.

michaeldiamant avatar Oct 04 '22 14:10 michaeldiamant