Use bytes type consistently #75
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.
Dependencies
No dependencies set.
Reference: Disroot/gpg-lacre#75
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 Python 3.x uses
bytes
for I/O and IPC, and we only did an automatic migration from 2.x to 3.x, we didn't take care of the types.To ensure stable operation, we need to:
Traceback:
It seems that
sys.stdin.read()
can only returnstr
.The plan:
bytes
orstr
).Python's built-in package
email
always producesstr
, regardless of the input type. SeeEmailParsingTest
in commit 558872d9d0.So do we need to then convert everything pushed to email t str?
I don't think so,
email
accepts anything but produces astr
.I haven't finished analysing the flow, just dumping findings here -- I hope you don't mind. (Just don't want it to disappear if something happens to my laptop, or to me.)
Fixed with #82.