* b4 is having trouble with unicode emails
@ 2022-09-22 21:10 Dmitry Torokhov
2022-09-22 21:48 ` Konstantin Ryabitsev
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2022-09-22 21:10 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: users, tools
Hi Konstantin,
It looks like b4 does not like non-acsii in emails, and fails for emails
like "Marek Behún <kabel@kernel.org>":
dtor@dtor-ws:~/kernel/linux-next (get_gpiod_from_child-remove)$ b4 send --no-sign --not-me-too --to='Marek Behún <kabel@kernel.org>' -o patches/gpiod-from-child
Converted the branch to 4 messages
Populating To/Cc addresses
Will write out messages into patches/gpiod-from-child
Traceback (most recent call last):
File "/usr/local/google/home/dtor/b4/b4/command.py", line 358, in <module>
cmd()
File "/usr/local/google/home/dtor/b4/b4/command.py", line 341, in cmd
cmdargs.func(cmdargs)
File "/usr/local/google/home/dtor/b4/b4/command.py", line 86, in cmd_send
b4.ez.cmd_send(cmdargs)
File "/usr/local/google/home/dtor/b4/b4/ez.py", line 1268, in cmd_send
msg.add_header('To', b4.format_addrs(allto))
File "/usr/local/google/home/dtor/b4/b4/__init__.py", line 2878, in format_addrs
addrs.add(email.utils.formataddr(pair)) # noqa
File "/usr/lib/python3.10/email/utils.py", line 91, in formataddr
address.encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xfa' in position 9: ordinal not in range(128)
dtor@dtor-ws:~/kernel/linux-next (get_gpiod_from_child-remove)$ b4 send --no-sign --not-me-too --to='Marek Behun <kabel@kernel.org>' -o patches/gpiod-from-child
Converted the branch to 4 messages
Populating To/Cc addresses
Will write out messages into patches/gpiod-from-child
0000-get-rid-of-devm_fwnode_get_-index_-gpiod_from_child.eml
0001-devm_fwnode_get_gpiod_from_child-is-going-away-as-the-name-is-too-unwieldy-let-s-switch-to-using-the-new-devm_fwnode_gpiod_get.eml
0002-devm_fwnode_get_gpiod_from_child-is-going-away-as-the-name-is-too-unwieldy-let-s-switch-to-using-the-new-devm_fwnode_gpiod_get.eml
0003-now-that-there-are-no-more-users-of-these-apis-in-the-kernel-we-can-remove-them.eml
---
DRYRUN: Would have sent 4 messages
Thanks!
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: b4 is having trouble with unicode emails
2022-09-22 21:10 b4 is having trouble with unicode emails Dmitry Torokhov
@ 2022-09-22 21:48 ` Konstantin Ryabitsev
2022-09-22 21:59 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Ryabitsev @ 2022-09-22 21:48 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: users, tools
On Thu, Sep 22, 2022 at 02:10:34PM -0700, Dmitry Torokhov wrote:
> Hi Konstantin,
>
> It looks like b4 does not like non-acsii in emails, and fails for emails
> like "Marek Behún <kabel@kernel.org>":
It wasn't really the unicode, we just weren't expecting to receive fully
formatted addresses like that. E.g., this was fine:
b4 send --to foo@example.com
but this wasn't:
b4 send --to 'Foo Foo <foo@example.com>'
The latest master/stable-0.10.y should have handle this properly.
-K
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: b4 is having trouble with unicode emails
2022-09-22 21:48 ` Konstantin Ryabitsev
@ 2022-09-22 21:59 ` Dmitry Torokhov
2022-09-22 22:11 ` Konstantin Ryabitsev
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2022-09-22 21:59 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: users, tools
On Thu, Sep 22, 2022 at 05:48:40PM -0400, Konstantin Ryabitsev wrote:
> On Thu, Sep 22, 2022 at 02:10:34PM -0700, Dmitry Torokhov wrote:
> > Hi Konstantin,
> >
> > It looks like b4 does not like non-acsii in emails, and fails for emails
> > like "Marek Behún <kabel@kernel.org>":
>
> It wasn't really the unicode, we just weren't expecting to receive fully
> formatted addresses like that. E.g., this was fine:
>
> b4 send --to foo@example.com
>
> but this wasn't:
>
> b4 send --to 'Foo Foo <foo@example.com>'
>
> The latest master/stable-0.10.y should have handle this properly.
No, if you look closely in my log there were 2 invocations, one with
--to 'Marek Behún <kabel@kernel.org>'
which dies with UnicodeEncodeError exception, while another, with
--to='Marek Behun <kabel@kernel.org>'
works properly.
This is with ToT checkout at:
6c215d8 ez: don't send a cover letter for a 1-patch series
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: b4 is having trouble with unicode emails
2022-09-22 21:59 ` Dmitry Torokhov
@ 2022-09-22 22:11 ` Konstantin Ryabitsev
2022-09-23 16:47 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Ryabitsev @ 2022-09-22 22:11 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: users, tools
On Thu, Sep 22, 2022 at 02:59:13PM -0700, Dmitry Torokhov wrote:
> > The latest master/stable-0.10.y should have handle this properly.
>
> No, if you look closely in my log there were 2 invocations, one with
>
> --to 'Marek Behún <kabel@kernel.org>'
>
> which dies with UnicodeEncodeError exception, while another, with
>
> --to='Marek Behun <kabel@kernel.org>'
>
> works properly.
Sure, but the problem was as I described. If we properly parse the --to
parameter as a header-like email address, as opposed to just expecting a bare
email address there, the fix does the right thing.
-K
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: b4 is having trouble with unicode emails
2022-09-22 22:11 ` Konstantin Ryabitsev
@ 2022-09-23 16:47 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2022-09-23 16:47 UTC (permalink / raw)
To: Konstantin Ryabitsev; +Cc: users, tools
On Thu, Sep 22, 2022 at 06:11:38PM -0400, Konstantin Ryabitsev wrote:
> On Thu, Sep 22, 2022 at 02:59:13PM -0700, Dmitry Torokhov wrote:
> > > The latest master/stable-0.10.y should have handle this properly.
> >
> > No, if you look closely in my log there were 2 invocations, one with
> >
> > --to 'Marek Behún <kabel@kernel.org>'
> >
> > which dies with UnicodeEncodeError exception, while another, with
> >
> > --to='Marek Behun <kabel@kernel.org>'
> >
> > works properly.
>
> Sure, but the problem was as I described. If we properly parse the --to
> parameter as a header-like email address, as opposed to just expecting a bare
> email address there, the fix does the right thing.
Ah, I understand now.
The new ToT does work for me now, thank you for fixing this.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-23 16:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-22 21:10 b4 is having trouble with unicode emails Dmitry Torokhov
2022-09-22 21:48 ` Konstantin Ryabitsev
2022-09-22 21:59 ` Dmitry Torokhov
2022-09-22 22:11 ` Konstantin Ryabitsev
2022-09-23 16:47 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.