-
Notifications
You must be signed in to change notification settings - Fork 106
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
tostring bug when using Python 3.9 #45
Comments
Can confirm this issue on Python 3.9. Traceback if necessary:
|
tobytes was introduced in ver 3.2, and since then tostring is deprecated alias for tobytes |
@fernandez85 i think, the fix is simple. |
I was thinking about this at first time, but then same problem will be with python ver 3.0.x, and 3.1.x. I know there shouldn't be many users of these versions, but best way is to make it right :) or use hasattr |
IIt does't matter, the result is the same. But for me is interesting:
Why? All python < 3.9 has "tostring", for python >=3.9 it will use the default as "tobytes". |
Thank you @The-42 for merging the PR that fixes this. Is there any change a new release could be cut and the PyPi package updated as well as most folks just pull intelhex as a dependency through pip? Thanks in advance. |
It does matter, because it isn't the same. It wouldn't matter for >=3.2 only, but then we wouldn't need getattr anymore
But not all has tobytes - it was introduced in ver 3.2 |
And what? It has tostring and it will be used, othervise tobyte will be used
|
Do you know why even this issue exist? In my solution only one attribute is processed, because of if statement |
Aha... Thanks, now it is cleare. |
I'll see to packing a release soon, still need to check on a couple issues though. Uploading to PyPi is currently out of my hands as @bialix is the Pypi maintainer for this package. |
Update: We've figured out PyPi, that isn't a showstopper anymore :) |
Okay folks, you should see a new release on pypi. pip seems to have found it:
readthedocs.io has not been updated yet, but that wasn't a priority :) |
Thank you @The-42 for the expedited release :-) |
intelhex/intelhex/compat.py
Line 60 in 9769d3f
tostring has to become tobytes for this to work in Python 3.9, likely in versions before this as well.
The text was updated successfully, but these errors were encountered: