Hi, Ivan. Thanks for the update! There are two typos in the subject line. You may also drop the '.py' part.
On 8/22/25 3:30 AM, Ivan Burnin wrote: > It has been discovered that Python versions below 3.7 may incorrectly > detect the encoding of text files. If the system encoding is not UTF-8, > then when building ovs with Python versions below 3.7, the ’24:checkpatch - > AUTHORS.rst existence’ test may fail with the error ’UnicodeDecodeError: > 'ascii' codec can't decode…’. > > Reproduced in an environment with the environment variable LC_CPTYPE = C, > openvsitch 3.3.5, Python 3.6. Not relevant when using Python version 3.7 or typo: openvswitch But also, since this patch is targeting main, all the text above is kind of irrelevant as we do not support 3.6 on main. The only relevant part is that UTF-8 mode is not default on all platforms for Python below 3.15. Would be nice to have the corresponding PEPs mentioned. > higher. Starting with this version, the locale is converted to UTF-8 > regardless of the value of environment variables for Unix. Starting > from 3.15 UTF-8 mode is default for all platforms. And, please, don't add unnecessary spaces between words. One space between words and two spaces between sentences is enough. There is no point in trying to fill the lines. Also, while not a rule, the commit message is normally wrapped at 72 to accommodate the extra spacing that 'git show' will add. > > Signed-off-by: Ivan Burnin <iburnin@k2.cloud> > --- > utilities/checkpatch.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py > index 28d0977eb..460bc4fa0 100755 > --- a/utilities/checkpatch.py > +++ b/utilities/checkpatch.py > @@ -841,7 +841,9 @@ def do_authors_exist(authors): > missing_authors = [] > > try: > - with open(get_top_directory() + "/AUTHORS.rst", "r") as file: > + with open( > + get_top_directory() + "/AUTHORS.rst", "r", encoding="utf-8" > + ) as file: I'd suggest creating an authors_file variable instead and using it in the open(). This will save us from line wrapping and so will look nicer. > file_content = file.read() > for author in authors: > m = re.search(r'<(.*?)>', author) Best regards, Ilya Maximets. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev