-
Notifications
You must be signed in to change notification settings - Fork 5
Port to Python 3 #7
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
base: master
Are you sure you want to change the base?
Conversation
Your commit message does not follow our guidelines,
Above all, you should have a working Python 2 environment to test the current master branch. Use Sugar Live Build or OLPC OS 20.04 in a virtual machine. You must make sure the activity works before porting, and to establish a baseline of features and behaviours. Failing to do this wastes a heap of time. |
Currently, no Here are the screenshots of the activity running in Sugar. |
Thanks. Have used this opportunity to write sugarlabs/sugar#991 (comment) ... did you also observe these things before porting? Tested c8afd0f;
|
Yes, I also observed these issues. Regarding the tracebacks, I used them as a reference while porting on Ubuntu 20, but I will check again to confirm. As for the 12 and 16 block buttons, they worked fine with the complete code during my testing. Untitled.design.mp4Thanks. |
Thanks. I'd like these fixed before merging this pull request. |
Sorry, but I am not seeing any AttributeError in my testing. If you could share the specific error messages, it would be very helpful in understanding the issue better. Thanks! |
Please describe exactly what your testing is, so we can see how it is different to mine. I've checked out c8afd0f and tested again, like this;
The AttributeError is reported in the activity source code. It is something you've missed in your porting. If I copy and paste it here, we'll never find out why you didn't get it. 😁 Have you used any of the Python coverage testing? |
- Replaced cStringIO with io. - Used hashlib instead of md5, as md5 is no longer available as a standalone module. - Fixed DBus import issues to align with Python 3 changes. - Updated JSON handling by replacing json.write() with json.dumps() for proper serialization. - Modified the exec command for correct execution in Python 3.
Thanks for the clarification! Initially, I was only checking the Sugar terminal logs, which is why I missed the issue. After following your testing method, I was able to catch the errors. I also tested all the files separately by executing them, and so far, they seem to be working fine. For coverage testing, I’ve now used it, but there are still some lines left untested. Please test the latest commits. Thanks. |
You've committed a backup file. |
Please also compare with sugarlabs/jigsaw-puzzle-branch ... perhaps your changes here will be useful there. The activities may be identical, I've not checked. |
Thanks! Let me know if there’s anything else that needs attention. |
Reviewed. Looks fine. Please do make a corresponding change to jigsaw-puzzle-branch, so as to avoid having someone change that independently of this. Where code is copied into other activities, as had happened here, we waste developer resources if we don't change copies at the same time. Thanks. |
I’ll update jigsaw-puzzle-branch to keep things consistent. |
I’ve ported the activity to Python 3, please have a look!
I’ve been using
flake8
to test and am also manually running it in Sugar to check its functionality.Are there any additional tests or best practices you would recommend to ensure everything works correctly? Any guidance would be greatly appreciated for this and future ports.
@quozl
Thanks.