[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 0/7] coroutines: generate wrapper code
From: |
Eric Blake |
Subject: |
Re: [PATCH v9 0/7] coroutines: generate wrapper code |
Date: |
Fri, 25 Sep 2020 07:57:41 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/25/20 3:04 AM, Vladimir Sementsov-Ogievskiy wrote:
24.09.2020 23:32, no-reply@patchew.org wrote:
Patchew URL:
20200924185414.28642-1-vsementsov@virtuozzo.com/">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
- [PATCH v9 7/7] block/io: refactor save/load vmstate, (continued)
- [PATCH v9 7/7] block/io: refactor save/load vmstate, Vladimir Sementsov-Ogievskiy, 2020/09/24
- [PATCH v9 3/7] block: declare some coroutine functions in block/coroutines.h, Vladimir Sementsov-Ogievskiy, 2020/09/24
- [PATCH v9 4/7] scripts: add block-coroutine-wrapper.py, Vladimir Sementsov-Ogievskiy, 2020/09/24
- [PATCH v9 5/7] block: generate coroutine-wrapper code, Vladimir Sementsov-Ogievskiy, 2020/09/24
- [PATCH v9 6/7] block: drop bdrv_prwv, Vladimir Sementsov-Ogievskiy, 2020/09/24
- Re: [PATCH v9 0/7] coroutines: generate wrapper code, Eric Blake, 2020/09/24
- Re: [PATCH v9 0/7] coroutines: generate wrapper code, no-reply, 2020/09/24
- [PATCH 0.5/7] include/block/block.h: drop non-ascii quotation mark, Vladimir Sementsov-Ogievskiy, 2020/09/25
- Re: [PATCH v9 0/7] coroutines: generate wrapper code, Stefan Hajnoczi, 2020/09/25