Message349663
Couldn't this be fixed in a backwards compatible way by clearing the cache when this type of error occurs? We can do this by wrapping the offending line with a try/except, then checking to see if the cache is corrupted. If it is, then we clear the cache and try again.
try:
if not s.rstrip(safe):
return s
except UnicodeDecodeError:
# Make sure the cache is okay, if not, try again.
if any([not isinstance(s2, str) for q2, s2 in _safe_quoters.values()])
# Cache is corrupted, clear it and try again.
_safe_quoters = {}
# Recursive call to try again
return quote(s, safe)
raise |
|
Date |
User |
Action |
Args |
2019-08-14 08:45:03 | Michael Sander | set | recipients:
+ Michael Sander, orsenthil, ezio.melotti, r.david.murray, koriakin |
2019-08-14 08:45:03 | Michael Sander | set | messageid: <1565772303.34.0.802562136321.issue23885@roundup.psfhosted.org> |
2019-08-14 08:45:03 | Michael Sander | link | issue23885 messages |
2019-08-14 08:45:03 | Michael Sander | create | |
|