From: Eric Blake <eblake@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-devel@nongnu.org
Cc: fam@euphon.net, kwolf@redhat.com, ehabkost@redhat.com,
qemu-block@nongnu.org, mreitz@redhat.com, stefanha@redhat.com,
crosa@redhat.com, den@openvz.org
Subject: Re: [PATCH v9 0/7] coroutines: generate wrapper code
Date: Fri, 25 Sep 2020 07:57:41 -0500 [thread overview]
Message-ID: <a6d7a44c-1739-ee32-ddb8-14d5c8e7bcb0@redhat.com> (raw)
In-Reply-To: <92b92954-201f-ae95-89db-7de650cd9a0b@virtuozzo.com>
On 9/25/20 3:04 AM, Vladimir Sementsov-Ogievskiy wrote:
> 24.09.2020 23:32, no-reply@patchew.org wrote:
>> Patchew URL:
>> https://patchew.org/QEMU/20200924185414.28642-1-vsementsov@virtuozzo.com/
>>
>> Program python3 found: YES (/usr/bin/python3)
>> Configuring ninjatool using configuration
>> ---
>> return codecs.ascii_decode(input, self.errors)[0]
>> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
>> 11406: ordinal not in range(128)
> Generating 'libqemu-aarch64-softmmu.fa.p/decode-vfp.c.inc'.
> Traceback (most recent call last):
> File
> "/tmp/qemu-test/src/block/../scripts/block-coroutine-wrapper.py", line
> 187, in <module>
> f_out.write(gen_wrappers(f_in.read()))
> File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
> return codecs.ascii_decode(input, self.errors)[0]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
> 11406: ordinal not in range(128)
>
>
> Interesting:
>
> [root@kvm up-coroutine-wrapper]# grep --color='auto' -P -n
> '[^\x00-\x7F]' include/block/block.h
> 307: * Child from which to read all data that isn’t allocated in the
> ^
>
> The file really contains one non-ascii symbol. I think it worth a
> separate patch. Still, it shouldn't break build process. On my system it
> works as is, probably unicode is default for me.
Python 3 has had an interesting history when it comes to 8-bit cleanness
by default. Which means we DO have to be explicit about utf8.
>
> Aha, from "open" specification:
>
> if encoding is not specified the encoding used is platform
> dependent: locale.getpreferredencoding(False) is called to get the
> current locale encoding.
>
>
>
> Is it ok, that utf-8 is not default on test system?
It's intentional.
>
> So, possible solutions are:
>
> 1. Enforce utf-8 io in scripts/block-coroutine-wrapper.py (patch 4)
Yes, we should do that regardless (we do it in our other python scripts).
> 2. Drop non-ascii quotation mark from block.h
Yes, we should do that as well (it's only in a comment, but it is
inconsistent).
> 3. Fix the test system default to be utf-8
No. That one we want to keep where it is, because it helps us flush out
these sorts of issues.
>
> Do we want them all?
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-09-25 13:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 18:54 [PATCH v9 0/7] coroutines: generate wrapper code Vladimir Sementsov-Ogievskiy
2020-09-24 18:54 ` [PATCH v9 1/7] block: return error-code from bdrv_invalidate_cache Vladimir Sementsov-Ogievskiy
2020-09-24 18:54 ` [PATCH v9 2/7] block/io: refactor coroutine wrappers Vladimir Sementsov-Ogievskiy
2020-09-24 18:54 ` [PATCH v9 3/7] block: declare some coroutine functions in block/coroutines.h Vladimir Sementsov-Ogievskiy
2020-09-24 18:54 ` [PATCH v9 4/7] scripts: add block-coroutine-wrapper.py Vladimir Sementsov-Ogievskiy
2020-09-24 19:10 ` Eric Blake
2020-09-25 8:04 ` Vladimir Sementsov-Ogievskiy
2020-09-24 18:54 ` [PATCH v9 5/7] block: generate coroutine-wrapper code Vladimir Sementsov-Ogievskiy
2020-09-24 18:54 ` [PATCH v9 6/7] block: drop bdrv_prwv Vladimir Sementsov-Ogievskiy
2020-09-24 18:54 ` [PATCH v9 7/7] block/io: refactor save/load vmstate Vladimir Sementsov-Ogievskiy
2020-09-24 19:00 ` [PATCH v9 0/7] coroutines: generate wrapper code Eric Blake
2020-09-24 20:32 ` no-reply
2020-09-25 8:04 ` Vladimir Sementsov-Ogievskiy
2020-09-25 12:57 ` Eric Blake [this message]
2020-09-25 8:32 ` [PATCH 0.5/7] include/block/block.h: drop non-ascii quotation mark Vladimir Sementsov-Ogievskiy
2020-09-25 12:58 ` Eric Blake
2020-09-25 16:02 ` [PATCH v9 0/7] coroutines: generate wrapper code Stefan Hajnoczi
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=a6d7a44c-1739-ee32-ddb8-14d5c8e7bcb0@redhat.com \
--to=eblake@redhat.com \
--cc=crosa@redhat.com \
--cc=den@openvz.org \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.com \
/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 NNTP newsgroup(s).