balena-io / balena-sdk-python

Balena SDK for Python
Apache License 2.0
67 stars 46 forks source link

Python 3.12 compatability #347

Closed MaxAvonic closed 9 months ago

MaxAvonic commented 11 months ago

We were using the latest python version for our docker version and this updated to 3.12 today. While building a new release as of now, we came across this issue. We do not have this issue when building our image with python 3.11

image

otaviojacobi commented 11 months ago

Hello @MaxAvonic thanks for raising but I could not reproduce. I created a empty conda environement with python 3.12.0 installed, ran a clean pip install balena-sdk from scratch and ran our test suite and manually tested a basic example and everything worked. More over, I ran our CI with Python 3.12 and everything is fine: https://github.com/balena-io/balena-sdk-python/pull/348

Now looking at your error I see it is caused because a bug on a version of the typing_extensions library which was already fixed on https://github.com/python/typing_extensions/pull/162 and on our SDK we defined this library version as "*" here, which means, any version. I suspect that in your build process some other library or some caching is setting this library aswell using an outdated version that has the bug, could you please ensure you set typing_extensions library to latest and check if it works?