[PATCH 01 of 10 STABLE] py3: decode payload of notify email

Gregory Szorc gregory.szorc at gmail.com
Sat Oct 26 02:20:18 EDT 2019


On Fri, Oct 25, 2019 at 5:42 AM Yuya Nishihara <yuya at tcha.org> wrote:

> On Thu, 24 Oct 2019 17:30:32 +0200, Denis Laxalde wrote:
> > # HG changeset patch
> > # User Denis Laxalde <denis.laxalde at logilab.fr>
> > # Date 1571927683 -7200
> > #      Thu Oct 24 16:34:43 2019 +0200
> > # Branch stable
> > # Node ID 4e91ce8060e960bd8f9656a1f9b00fdb82199b3c
> > # Parent  4565a0afc2891f0bbba8ea9d9df21267d18cf832
> > py3: decode payload of notify email
> >
> > This fixes one UnicodeEncodeError in test-notify.t:422 when testing the
> > notify hook with non-ascii content (there are more later).
> >
> > diff --git a/hgext/notify.py b/hgext/notify.py
> > --- a/hgext/notify.py
> > +++ b/hgext/notify.py
> > @@ -401,7 +401,7 @@ class notifier(object):
> >              # create fresh mime message from scratch
> >              # (multipart templates must take care of this themselves)
> >              headers = msg.items()
> > -            payload = msg.get_payload()
> > +            payload = msg.get_payload(decode=True)
>
> I'm not pretty sure if this is safe on Python 2.
>

test-notify.t and test-keyword.t seemed to have regressed on Python 3.7
with this series. Compare
https://ci.hg.gregoryszorc.com/job-info/hg-committed-a2ff3aff81d244685cf2f25a1ee92f379d1d115c-debian10-cpython-3.7-0#failed-tests
with
https://ci.hg.gregoryszorc.com/job-info/hg-committed-416041f97cc333b9a1bf04d10b5502ac78a3f33d-debian10-cpython-3.7-0#failed-tests.
I'm not sure if that is due to an incomplete series landing or what.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20191025/f7d0dcb2/attachment.html>


More information about the Mercurial-devel mailing list