<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 25, 2019 at 5:42 AM Yuya Nishihara <<a href="mailto:yuya@tcha.org">yuya@tcha.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 24 Oct 2019 17:30:32 +0200, Denis Laxalde wrote:<br>
> # HG changeset patch<br>
> # User Denis Laxalde <<a href="mailto:denis.laxalde@logilab.fr" target="_blank">denis.laxalde@logilab.fr</a>><br>
> # Date 1571927683 -7200<br>
> #      Thu Oct 24 16:34:43 2019 +0200<br>
> # Branch stable<br>
> # Node ID 4e91ce8060e960bd8f9656a1f9b00fdb82199b3c<br>
> # Parent  4565a0afc2891f0bbba8ea9d9df21267d18cf832<br>
> py3: decode payload of notify email<br>
> <br>
> This fixes one UnicodeEncodeError in test-notify.t:422 when testing the<br>
> notify hook with non-ascii content (there are more later).<br>
> <br>
> diff --git a/hgext/notify.py b/hgext/notify.py<br>
> --- a/hgext/notify.py<br>
> +++ b/hgext/notify.py<br>
> @@ -401,7 +401,7 @@ class notifier(object):<br>
>              # create fresh mime message from scratch<br>
>              # (multipart templates must take care of this themselves)<br>
>              headers = msg.items()<br>
> -            payload = msg.get_payload()<br>
> +            payload = msg.get_payload(decode=True)<br>
<br>
I'm not pretty sure if this is safe on Python 2.<br></blockquote><div><br></div>test-notify.t and test-keyword.t seemed to have regressed on Python 3.7 with this series. Compare <a href="https://ci.hg.gregoryszorc.com/job-info/hg-committed-a2ff3aff81d244685cf2f25a1ee92f379d1d115c-debian10-cpython-3.7-0#failed-tests">https://ci.hg.gregoryszorc.com/job-info/hg-committed-a2ff3aff81d244685cf2f25a1ee92f379d1d115c-debian10-cpython-3.7-0#failed-tests</a> with <a href="https://ci.hg.gregoryszorc.com/job-info/hg-committed-416041f97cc333b9a1bf04d10b5502ac78a3f33d-debian10-cpython-3.7-0#failed-tests">https://ci.hg.gregoryszorc.com/job-info/hg-committed-416041f97cc333b9a1bf04d10b5502ac78a3f33d-debian10-cpython-3.7-0#failed-tests</a>. I'm not sure if that is due to an incomplete series landing or what.<br></div></div>