mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[GH-ISSUE #1689] Encoder for imap_utf7 not compatible with PyPy #1327
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1327
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Originally created by @PatTheMav on GitHub (Mar 2, 2019).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1689
Impacted versions
Steps to reproduce
lib/imap_utf7.pywith PyPy directlyAlternatively:
Current behavior
The webmail portion of the web interface doesn't work when Modoboa runs under PyPy, giving the following "final" error:
Investigating the codebase yielded the following observation:
The IMAP UTF-7 codec (defined in
lib/imap_utf7.py) accepts only a single parameter in itsencodermethod, yet for some reason PyPy always (!) sends 2 parameters:While this second parameter exists in CPython's own
Codecspecification, it doesn't use a second parameter by default).A simple patch makes Modoboa compatible with PyPy (at least I haven't observed any errors so far):
Changing both signatures to
def encoder(s, __):anddecoder(s, __):respectively.Expected behavior
Modoboa webmail works as intended.