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 25AED45490; Tue, 18 Jun 2024 17:54:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1635B402E3; Tue, 18 Jun 2024 17:54:40 +0200 (CEST) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id CDB8D402B4 for ; Tue, 18 Jun 2024 17:54:38 +0200 (CEST) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-42165f6645fso45373775e9.2 for ; Tue, 18 Jun 2024 08:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1718726078; x=1719330878; darn=dpdk.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=CUE5iDIPfNcRG06h2Xv9iJxWC4xME/pV14BEuC2J+GQ=; b=pTHKT0IvTLTKOIEE+3av6R2LY5tzRs76abqO0EjfKqT4uA9indRQkkOOWgYT1tOEVk E75NOHj7pF4Nt5gWtN/RFd3CKDgmUmdg5SzxyQq/+rPD6o2s73yPViVXyieuet9EFzB6 5LcARQIWXGuc9drmXDDIuaJemXT8E20FCLB09y9Iu5sFxQFEQAv1eX7ttLeOlPl4uHGz KngR0uIMjduhx5gTFEeYf9bXYrr6P5LoQyvoxtU6j8hgXfsYazrdZQ5eP2AT5i0FtPmU bHa8Uk3mdghPBpcPchoP3rBfr1fjWQw9WTtXfekZSN+Nj5/F5ai0MikjfWrZMTTYUCmH k3qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726078; x=1719330878; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CUE5iDIPfNcRG06h2Xv9iJxWC4xME/pV14BEuC2J+GQ=; b=qmb/dEIpLTav/lGf7fvv5Yh+lQonVHcdGWHkCFXOPctLSpLUu92+Nwll33AtdpyPOE jhJmooXuKa5MqXlsPaGcqVi8ZbRevIghA2PydHEU0Ih5dn/0DuwrSGQcGeXxM1tS6y4s 3Je4jpy2rIXaXXsgS7wiOPP8t+1yH/B8kU5a4zuEJolc6bxL0nI/81jx8m6nkwSjZDaW dUZKfwQpunat4rYmCMt96TD5CEZ1mpydQ2Y911PtdPmUT+KU6Y8IgQxlHj0HJPodIIje rLmFaFjdDpztfaBZUwNInPEgvL9R3sHvZtzOGjIZJVrLCqsUSI5bLkxXADfB/hzyYa8/ Qw8g== X-Gm-Message-State: AOJu0YwzbMMV8nCkRqd4yXezYDus8dpAyZH0JZDSfT3xXQkV95gji8GP YH7nOOh2Qo6A+j5zk24OxaRtgROgi7gQZXF/6oNVBs9BQ/NwCGO+GSfFZUHMrxc= X-Google-Smtp-Source: AGHT+IHROeHVE2WMFqyhZ3TFzcEELtMQ/CODQYBiImhbCEN8v+2RF49ES0uC38y6l01fmXYgHAi7wA== X-Received: by 2002:a05:600c:4448:b0:421:7ee4:bbf0 with SMTP id 5b1f17b1804b1-423047dde19mr119472685e9.0.1718726078470; Tue, 18 Jun 2024 08:54:38 -0700 (PDT) Received: from [192.168.1.113] ([84.245.121.236]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-362cd0d79fdsm541234f8f.77.2024.06.18.08.54.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jun 2024 08:54:38 -0700 (PDT) Message-ID: <2e646fd7-ba9e-4cc4-b163-d6ff38eaa9bc@pantheon.tech> Date: Tue, 18 Jun 2024 17:54:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/4] dts: improve starting and stopping interactive shells To: jspewock@iol.unh.edu, probb@iol.unh.edu, yoan.picchi@foss.arm.com, npratte@iol.unh.edu, Honnappa.Nagarahalli@arm.com, wathsala.vithanage@arm.com, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, thomas@monjalon.net Cc: dev@dpdk.org References: <20240514201436.2496-1-jspewock@iol.unh.edu> <20240613181510.30135-1-jspewock@iol.unh.edu> <20240613181510.30135-3-jspewock@iol.unh.edu> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: <20240613181510.30135-3-jspewock@iol.unh.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 > @@ -15,18 +18,34 @@ class InteractiveShell(SingleActiveInteractiveShell): > + def _start_application(self, get_privileged_command: Callable[[str], str] | None) -> None: > + """Overrides :meth:`_start_application` in the parent class. > + > + Add a weakref finalize class after starting the application. > + > + Args: > + get_privileged_command: A function (but could be any callable) that produces > + the version of the command with elevated privileges. > + """ > + super()._start_application(get_privileged_command) > + self._finalizer = weakref.finalize(self, self._close) I think we can just add the above line to start_application() to achieve the same thing. And we should move the docstring to the public method. > + > def start_application(self) -> None: > """Start the application.""" > self._start_application(self._get_privileged_command) >