Rewrite to python3 #10
Labels
No Label
ANSIBLE
BUG
CODE
DEVELOPMENT
DOCUMENTATION
FEEDBACK
FIX
HOWTOs
IDEA
INFRA
ISSUE
MAILSERVER
TESTS
To-Be-Reviewed
WEB
WEBSITE
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Depends on
#39 Introduce unit tests to current codebase
Disroot/gpg-lacre
#52 Run automatic migration to Python 3.x
Disroot/gpg-lacre
Reference: Disroot/gpg-lacre#10
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Since the mailgate is still written in python2 we should start by rewritting to python3
Python comes with a module
lib2to3
that can be used to automatically port Python 2.x source to Python 3.x. I've just tried it out and the result was one step away from compiling as Python 3.7.Auto-porting:
(Above command produces a bumch of
*.py3
files.)Then, I just had to clean up indentation (tabs mixed with spaces are not allowed), and it compiled with no other issues.
Before using this tool, I would just write some unit tests to make sure nothing breaks during the process of auto-porting (or at any later time).