Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	tools@linux.kernel.org,  users@linux.kernel.org
Subject: Re: b4 prep and --manual-reroll
Date: Fri, 4 Nov 2022 12:47:46 -0500	[thread overview]
Message-ID: <CAL_JsqJHGUMsLUpH=s8Xa46NU9dbBuvPMCPJyRwQdvFr3WK9tw@mail.gmail.com> (raw)
In-Reply-To: <20221104171340.ilq22prnm2kbyjrn@meerkat.local>

On Fri, Nov 4, 2022 at 12:14 PM Konstantin Ryabitsev
<konstantin@linuxfoundation.org> wrote:
>
> On Thu, Nov 03, 2022 at 10:00:07PM -0700, Dmitry Torokhov wrote:
> > Hi Konstantin,
> >
> > Somehow "b4 send -o dir" followed by "git send-email ..." managed to
> > produce quoted-printable cover letter message (see
> > https://lore.kernel.org/all/20221103-omapfb-gpiod-v1-0-c3d53ca7988f@gmail.com/)
> > and that confused "b4 prep --manual-reroll ..." as this produced a tag
> > that had "=0D" as line ends. I was able to work around it with the
> > patch below (not sure if this is right thing to do)...
>
> Ah, yes, quoted-printable is the bane of my existence. Thank you for reporting
> this. I think a better way forward is to get away from get_payload(), which is
> a legacy method that I kept around when we cared about python3.6
> compatibility. I'll comb the codebase for a better solution.

FWIW, this is what I use:

body = orig_msg.get_body(preferencelist='plain').get_content(errors='strict')


For sending replies, python prefers base64 if any encoding is needed,
so I do this:

    msg = email.message.EmailMessage(policy=email.policy.default)
    charset = orig_msg.get_content_charset()
    if charset:
        msg.set_content(body, charset=charset, cte='8bit')
    else:
        msg.set_content(body, charset='ascii', cte='7bit')


Rob

      reply	other threads:[~2022-11-04 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  5:00 b4 prep and --manual-reroll Dmitry Torokhov
2022-11-04 17:13 ` Konstantin Ryabitsev
2022-11-04 17:47   ` Rob Herring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_JsqJHGUMsLUpH=s8Xa46NU9dbBuvPMCPJyRwQdvFr3WK9tw@mail.gmail.com' \
    --to=robh@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@linux.kernel.org \
    --cc=users@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).