Received: by 10.192.165.148 with SMTP id m20csp5314555imm; Tue, 1 May 2018 12:47:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpeHigqh4juYElHwNVq35Wg2ZNKO0ygNa0AcKVAQ2ne+VTrmps1s4X9WpSDGPHo7Qu8I14U X-Received: by 2002:a17:902:6ac3:: with SMTP id i3-v6mr7234176plt.378.1525204071944; Tue, 01 May 2018 12:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525204071; cv=none; d=google.com; s=arc-20160816; b=aubCxv+aeb0INlECn5mhcWCWGOkSFsc1b8gKCRkTwm5+bWK1/MC/hrwIsaU5gktED/ 8iAZ5qz5B3gIyOCfz1Ut7W1sjyDgBaZfcBwca2hEhcjhDq/o73CXQSWzTCsyNPh3T19b g25yqIhfGcKeE4oywXlB9L1KovsxPjs7SFnc1SpmXCXkbqhnK+wPH48r79G/UGIphJq0 2PINBeVsUkbOfj5a9NjlxMLIkFv8pI/73w3825eXpHPeG1OZE52K2FuELhh8LhAAL1l7 DuheumOOGhIHbfIjeg0ul619AQaXmucaPBC5+utOmTT+c376xf+T9B3ZkfPjMyeX4KfX VqLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=AD6ZGpBchhBOB+MuTBjWzd2nnxXsXOySZhdnwAj5I2s=; b=eKiCDITPjXuJbHaKx9UFt9RsDF5mrrZhAq0Are40trk2r17ZQIO0nPU7TAlUaQlheM sGhDIWxJZu8wzot/7/u0rGeILGNBvp/fTOv9oxca+vxc9QK3WI72tClDmRZwoYmRAnsW X97sHjJobOt5UAPClK4UX1T5l+k6YG5B15TM1+GjDjISLXS4T2t7IPnmBw1mtm1x7gBn RC4JcpwKVlOBxA/44gVPNGaClyDUUn9pIStN0xnZnt3WYp1PSAtHj0dEAkB5GZjBy+5I AntajaMA26ybIwvWoQUuDJVIuKZg6IDpZEIRPUOGUWICD2jzzt8iceHBn/3VdxQztJl+ S2Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vs1b7c7v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t190-v6si8333850pgb.623.2018.05.01.12.47.36; Tue, 01 May 2018 12:47:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Vs1b7c7v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751177AbeEATr0 (ORCPT + 99 others); Tue, 1 May 2018 15:47:26 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:46754 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbeEATrY (ORCPT ); Tue, 1 May 2018 15:47:24 -0400 Received: by mail-oi0-f67.google.com with SMTP id y15-v6so10951185oia.13; Tue, 01 May 2018 12:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=AD6ZGpBchhBOB+MuTBjWzd2nnxXsXOySZhdnwAj5I2s=; b=Vs1b7c7vbPshJe4d+U3weHhck+AIJJ5vkgWkgWGsg3WP5G6S8jtEYXmDyHTMEIP549 4OA/2MBNF4X/Lh+UVp3oZ7Ns+Xr7FnDrZtP9g1/iwuUAR2MogBTkvu13R/5h08m86kJi 7xzGXy0IruDJOrKFRixQykoY6T40gCjTCgQaws4HjpmS+2t+g+7jRXB3fwXIcaBH9QwL qJODcE+pHDAvfJMtiASNze/Q/wLXnNXq35Nqe7zp+X2Nwlf6qz6ROZLuMyI5vQxgzLXA UicPqRoz8fy1m0g1R5wK7YSe9myEnTo5g6DhXYQrKL/JqKZIYnZGHtLT1L9Btn+E8aul J1Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=AD6ZGpBchhBOB+MuTBjWzd2nnxXsXOySZhdnwAj5I2s=; b=kxeCE6MoXYA+tDdoM+h6NWTtEbpZ00+/Q+eBME8c/o3lG1s6ZY9Ro3xeMBeWZovbHR HKxTdkZ2QeY419OPpgD7qR9AJGRiqDnSXUwe2DiHj3TuS2KPIHezcoDRjBuci3hVQbcv 9Z8ImMZzlctOm1UCyHo1UiJRM5/eLEjFSLgILKuBod7JGFsoSqDqAzfHAf+Dk77DBjp/ ywrFdjBzbcFd+1qPpGU1WU/gyskwIfAhvJ5QWUUUR9VXBIbIYnOm2IL8UvGoDcQoYvaR KFAf9y5q58UgfTN5eoR2J7/eQWuUvn3ITNTWKLOezNrnySChpuRED2yLppTz+A71DF5m UR2Q== X-Gm-Message-State: ALQs6tCj10VgB6PMcSe4S6/62mDliCU20z2Llvh91UEhGb0l0/s3ap+y exwH1iN8zxhO86JBvlczky4lREkCiHsw2wvz35U= X-Received: by 2002:aca:2815:: with SMTP id 21-v6mr10944451oix.268.1525204044270; Tue, 01 May 2018 12:47:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:185:0:0:0:0:0 with HTTP; Tue, 1 May 2018 12:47:23 -0700 (PDT) In-Reply-To: References: From: Ulf Magnusson Date: Tue, 1 May 2018 21:47:23 +0200 Message-ID: Subject: Re: [ANNOUNCE] Kconfiglib menuconfig implementation To: Randy Dunlap Cc: Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 1, 2018 at 9:12 PM, Ulf Magnusson wrote: > On Tue, May 1, 2018 at 7:56 PM, Randy Dunlap wrot= e: >> On 04/30/2018 05:57 PM, Ulf Magnusson wrote: >>> Hello, >>> >>> Kconfiglib (https://github.com/ulfalizer/Kconfiglib) now has a >>> terminal menuconfig implementation, implemented in plain curses >>> (which is in the Python standard library). >>> >>> The interface should feel familiar to people used to mconf. It has >>> some features that mconf lacks: >>> >>> - Seamless resizing >>> >>> - Unicode support >>> >>> - Runs on Windows (via 'pip install windows-curses', which uses >>> PDCurses) >>> >>> - Improved information displays: >>> >>> * All expressions are split into readable chunks >>> >>> * Menus and comments have information displays >>> >>> - Relatively easy-to-read and easy-to-tweak code. >>> >>> Kconfiglib automatically invalidates symbols as needed, and >>> values can never get stale, which helps. >>> >>> Some upcoming features are mouse support and a search feature that >>> can jump directly to the definition of a symbol. The jump-to feature >>> will use a "show-all" mode in case the symbol isn't visible. >>> >>> See the Kconfiglib GitHub page for screenshots. The menuconfig >>> implementation is at >>> https://github.com/ulfalizer/Kconfiglib/blob/master/menuconfig.py. >>> The docstring at the top has some more information. >> >> Hi, >> >> I'm probably missing some python additive (I hope it's that easy), but >> menuconfig.py is not liking the "degree" symbol in drivers/net/can/peak_= canfd/Kconfig: >> >> config CAN_PEAK_PCIEFD >> depends on PCI >> tristate "PEAK-System PCAN-PCIe FD cards" >> ---help--- >> This driver adds support for the PEAK-System PCI Express FD >> CAN-FD cards family. >> These 1x or 2x CAN-FD channels cards offer CAN 2.0 a/b as well= as >> CAN-FD access to the CAN bus. Besides the nominal bitrate of u= p to >> 1 Mbit/s, the data bytes of CAN-FD frames can be transmitted w= ith >> up to 12 Mbit/s. A galvanic isolation of the CAN ports protect= s the >> electronics of the card and the respective computer against >> disturbances of up to 500 Volts. The PCAN-PCI Express FD can b= e >> operated with ambient temperatures in a range of -40 to +85 = =C2=B0C. >> >> >> kconfiglib.KconfigSyntaxError: >> Malformed ascii in drivers/net/can/peak_canfd/Kconfig >> Context: b't temperatures in a range of -40 to +85 \xc2\xb0C.\n' >> Problematic data: b'\xc2' >> Reason: ordinal not in range(128) >> >> >> thanks, >> -- >> ~Randy > > Thanks for trying it out! > > You're probably running in the C locale, which implies an ASCII > encoding. That has caused enough trouble that the Python devs decided > to automatically convert it to UTF-8 in Python 3.7: > https://www.python.org/dev/peps/pep-0538/. LC_CTYPE=3DC.UTF-8 should fix > it. > > It's a bit silly to have it crash for something like that though. I > could force UTF-8 instead of respecting the locale (though it feels > neater to respect settings), or tell Python to ignore decoding errors. > Should probably do something at least... > > Cheers, > Ulf Leaning towards just forcing UTF-8. It's what you want in 99% of cases, and ignoring decoding errors would be unsafe for Unicode string values. Could make the forcing optional, and default to on... Cheers, Ulf