From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA10545822; Tue, 20 Aug 2024 11:12:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F4DB4026C; Tue, 20 Aug 2024 11:12:52 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mails.dpdk.org (Postfix) with ESMTP id 8AD86400D6 for ; Tue, 20 Aug 2024 11:12:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724145171; x=1755681171; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=rJRKAnXO2pkKkj+LPOhpUGTwZotya6lDZkSKC3Z86p8=; b=AoOgcLNuHcAQRgH8By0vqF8hEKOzw39TH1Vm+8jN1VDL101rTdG/7jAn sQJzOOZjJ8bThyRDZRoDhiUkOfOuhtwTLowwxphl5Vn2O8CSf0c919iV/ tJit+R9uRplnk+YxQZrbOUwOTbk0otcvX5h0uJl2EdPXZgCBild9qyrFI OSzmgd7kWrFQcf0qCu+fKbcJMjpxfnsJY1IoxHCQspehgigPy8ZKfl6sa 5alN0rnRul3Ei3VHZyoXkowNAMUCb7KQBGRMS07Tj2bkN9g04Xzze1jEn Cg4BXQOU7F3CQ6FJjmVk+TJrXyDm3MYDq2bkcFY/JhUwc9tY9qScfZfTu w==; X-CSE-ConnectionGUID: PHlzd+tSSlmv0iNevIhMpA== X-CSE-MsgGUID: GbxKQubwQ1eGlx4SgCsgIg== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22240001" X-IronPort-AV: E=Sophos;i="6.10,161,1719903600"; d="scan'208";a="22240001" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2024 02:12:50 -0700 X-CSE-ConnectionGUID: ++VtD1wTRX2eFR8fFQ3U3Q== X-CSE-MsgGUID: wmcVHcGjT2uN4KaMvqhnfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,161,1719903600"; d="scan'208";a="61223587" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa007.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 20 Aug 2024 02:12:50 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 20 Aug 2024 02:12:49 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 20 Aug 2024 02:12:49 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 20 Aug 2024 02:12:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=I5U8zrmwZ4Izy2KLavEhxJ1I3ymQr0/IIBMvkN/A6hrzrnX9vTZqwYHEYdX+IEW6rmEnfBfS13JMM5hLT+HX0aoDyybUFyVklwLk5OoAwfgB52IDUoGT1tud4YE9/ak/eDN5Z99vfe+tr/BmejJh7zMjSetaaNgjiBhFBfzp76yKHJ9aE+OloDDV6mPFu0PuJoSPQ8Y3S3OHOWqrV7j7tT41wCtQPqF0nOR8Dh+8VMnjVOcYYdW2aiRXNUcX+qT9WV2Lk146U2ZjeTWoPn4KzWDis59f3aqOVhrfmSZ32uwp8v3wPGQtH7sWr3RsYa5iuXAiL4XG48PCMIG/+HLSlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qJqQmhpJ2I9a7Y7+ZjMZlIMcgwz643YlfF0wj8bZXuI=; b=d/u9pSGf8XSBL9cV9YpO70l4PPMvVSatxB6+hsc/9KjTMV4lmBWdWsPTJyhXzvwN/1tyKaeWJmXKPrN/IBk8kha4MhD9iutcCIZAaqCXQAgYlDVDCXD6tPU5d1HBD7N4hena8TpSaa+i9UawwRx+ot1I8O/8ZAFCs9fAGI1mIjTFtAKd8xXrJi3SYeKkntEeilLubzBvkgu6OpwcIQaQ5qow+iNzSljSbHtY2gZ9AH5fkGYG0gaMLSGC6XVPYr27JHwsOBM1E+FJD9DvacUXGfqsoCtxzytsx9dTC751kVv/auFzhQ1JAij8bQsDu9yK3N7lEFDs/Ny+/KvApRuzOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH7PR11MB6498.namprd11.prod.outlook.com (2603:10b6:510:1f1::21) by SN7PR11MB6678.namprd11.prod.outlook.com (2603:10b6:806:26a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.18; Tue, 20 Aug 2024 09:12:30 +0000 Received: from PH7PR11MB6498.namprd11.prod.outlook.com ([fe80::999a:425d:a211:5d30]) by PH7PR11MB6498.namprd11.prod.outlook.com ([fe80::999a:425d:a211:5d30%6]) with mapi id 15.20.7875.019; Tue, 20 Aug 2024 09:12:30 +0000 Message-ID: Date: Tue, 20 Aug 2024 11:12:24 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/4] usertools/cpu_layout: update coding style To: Robin Jarry , CC: References: <4844fc3a4604ffef789702752ff04699ab5118db.1723810613.git.anatoly.burakov@intel.com> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU7P189CA0024.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:552::11) To PH7PR11MB6498.namprd11.prod.outlook.com (2603:10b6:510:1f1::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR11MB6498:EE_|SN7PR11MB6678:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e6f0ce0-376d-4fe9-14dd-08dcc0f837c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?THhnUlhkOHR2M0NkTFdyQVBDOGZ4WXpmUitxTEsvZlJza3lkajhLTHNnZ1pB?= =?utf-8?B?TkxqdGxnM0RhS29pT3BtTHNsTkUvTm9HSU9sN2VOWGcySFRKdlFnbzZBK0Zw?= =?utf-8?B?Rms2OVhNSHZKWFFnRmMvaFhyY1RRUnZCN0tNajUwOSsvZjh5L1VKVEZUdmtx?= =?utf-8?B?K2lGTFQ1MUkxZDc5ZmRGV0Y0WCszdnlZK3diVHpyZjdwbXNDZU9XUzZCOXpG?= =?utf-8?B?bURBcGpyYTlhbHhSdUYwSnhLNFJTczNQSWplVEZVMHRSWjZYOFZRR3JldFRn?= =?utf-8?B?bmEvcWZYWVpvTHVIUVpVSnRieE1US2duM0VKeGVoOW9CTndNM0JaVzdhR1Zr?= =?utf-8?B?RWMweWtRREpGM3dFUV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?B?TjlSVFRUZXBvbXVTYUhnSHRVMy9rQjNQVDh4elRDU2dqb0l1emZOaklLNXUy?= =?utf-8?B?RnhKRC9QcGE1bFN1djZGR1VwaUxaQlhsYmNhQVBuQ1NDVjlscjRBR2ZiZzFO?= =?utf-8?B?cXl3ZHJGL3NOVzhaRXJKSUlNekQxcUt4a1NXMTVGRnRVZldNMnZ6NXhyaXFL?= =?utf-8?B?NnpCWjFvZGROQzAwQ3hJVVUzVGlEd09uQTRrcWFkNDZXdU1WdWUvb3dnSzB3?= =?utf-8?B?T3JjUWJzYWxBem5wVzdGcUYyZEJzL210enhFYnVSYVNXQUxzNVVyR1NlWDUx?= =?utf-8?B?NUVEcXhKaitMOG9TK2VubUVianBNQ2kxNytjZnV5alBGVksyL3lZdWdGT2U3?= =?utf-8?B?SDdnTDFTOEVSYU9KQlN0aGxIVG1iU1pJcDE3c2g0RFlqVkExMlJ1OThHK09C?= =?utf-8?B?T29hd1ErR0pGdkkyc2VIVjNmeVdLblQrejljYy9ZOGliaTVucitvT0R5Z0Jy?= =?utf-8?B?SHluRWNpd25JNW01NFpnRlp2OHdpMlh3OXkyOEJnd2J5cCs3dXEyZFRhN0lr?= =?utf-8?Q?g5e82ILqf/zx/glYw3Nv5ElbeEGJJyawD4Xek=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6498.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MThWdVB2YnUzYnRVRUh2dSs5LzBwUnlYVmo3UHRyZ1ZXRTlHc2tOcGJ5ZEZn?= =?utf-8?B?cFpnTTB5QWg0cE80N0xMRmtWVzJuOE5zWWJENWE1MUZkZWhVZFlPcVU0c2FF?= =?utf-8?B?TXhVdWlZbVJ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= =?utf-8?B?Ylh5YzBaNzdzdUJDNVU0ZFFzblpVN1JEMTV6ZWNzM1JMZFNyMWR1dExBVTRk?= =?utf-8?B?U0p5WjhFZ2Uxbm1YK2d4cDlRVWpwaGtlek5EZlhuUHllOXpZMk8xMEQvY08y?= =?utf-8?B?ZXVma01ic0RzSXdad1J5bzBJTFRCRHI0S0lqalE4cEp5a2hwdlZVZ0ZrbUI4?= =?utf-8?B?N0Y1NlBDUlREMlMxY0pYSmdJTHpvNFRRU1Y2OTBaWXdpak9UYjVlL1Jqekdt?= =?utf-8?B?ZWc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4e6f0ce0-376d-4fe9-14dd-08dcc0f837c8 X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6498.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2024 09:12:30.1261 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 40yLMw7FrufprBqJeEqakAd6TU/IUDhe6TXml2v8EQa50Y+YI2WtLXWFVZVyjiqDJQn6sR3fSP5EReHajtqKu+OsTEdOFOQ9aWKJQKNN378= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6678 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 8/19/2024 1:11 PM, Robin Jarry wrote: > Anatoly Burakov, Aug 16, 2024 at 14:16: >> Update coding style: >> >> - make it PEP-484 compliant >> - address all flake8, mypy etc. warnings >> - use f-strings in place of old-style string interpolation >> - refactor printing to make the code more readable >> >> Signed-off-by: Anatoly Burakov >> --- <...> > > FYI: if we change the minimum supported python version to 3.9, we could > even get rid of this import completely as builtin types `set`, `list`, > `tuple` and `dict` have become subscriptable. > >    https://peps.python.org/pep-0585/ > > You can use them directly instead of the symbols defined in the typing > module. E.g. the following becomes valid syntax: > >    def foo(a: list[set[int]]) -> dict[str, tuple[str]]: > > Instead of the more verbose: > >    def foo(a: T.List[T.Set[int]]) -> T.Dict[str, T.Tuple[str]]: > > But we can keep that for another day. > Incidentally, `dpdk-pmdinfo.py` script does use this syntax already. So either our minimum Python requirement is already met for this, or pmdinfo needs to be fixed to avoid it. -- Thanks, Anatoly