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 A939C4575D; Wed, 7 Aug 2024 15:34:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70E944028C; Wed, 7 Aug 2024 15:34:41 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 826784027B for ; Wed, 7 Aug 2024 15:34:39 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9B348FEC; Wed, 7 Aug 2024 06:35:04 -0700 (PDT) Received: from [10.1.39.35] (JR4XG4HTQC.cambridge.arm.com [10.1.39.35]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B771F3F5A1; Wed, 7 Aug 2024 06:34:37 -0700 (PDT) Message-ID: <156d06f3-552a-498a-9569-7602576c4f2b@arm.com> Date: Wed, 7 Aug 2024 14:34:36 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v15 2/5] dts: replace the or operator in third party types Content-Language: en-GB To: =?UTF-8?Q?Juraj_Linke=C5=A1?= , thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, bruce.richardson@intel.com, jspewock@iol.unh.edu, probb@iol.unh.edu, paul.szczepanek@arm.com, npratte@iol.unh.edu Cc: dev@dpdk.org References: <20231115133606.42081-1-juraj.linkes@pantheon.tech> <20240806151937.391917-1-juraj.linkes@pantheon.tech> <20240806151937.391917-3-juraj.linkes@pantheon.tech> From: Luca Vizzarro In-Reply-To: <20240806151937.391917-3-juraj.linkes@pantheon.tech> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 Hi Juraj, In the past, I have noticed this problem appear only on Python versions prior to 3.10. Before PEP 604[1] – introduced in Python 3.10 – the pipe operator was always used as an operator between objects instead of an alias for Union in the annotations. A quick test verifies this: Python 3.8.18 (default, Aug 25 2023, 13:20:30) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from collections import Counter >>> from typing import TypedDict >>> class t(TypedDict): ...     a: Counter | None ... Traceback (most recent call last):   File "", line 1, in   File "", line 2, in t TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' >>> I have also attempted to build the docs removing this commit on my local setup (outside of the Poetry shell) and it appears to be working with no problems. Best, Luca [1] https://peps.python.org/pep-0604/