From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UAdDAfso32YtXyUAWB0awg (envelope-from ) for ; Mon, 09 Sep 2024 12:57:31 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Rtd07eBa; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 017671E353; Mon, 9 Sep 2024 12:57:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-12.8 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,URIBL_BLOCKED, URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 720761E08F for ; Mon, 9 Sep 2024 12:57:30 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 341E8385840B for ; Mon, 9 Sep 2024 16:57:30 +0000 (GMT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 5AA453858D39 for ; Mon, 9 Sep 2024 16:57:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5AA453858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5AA453858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725901034; cv=none; b=p45QVufhXftemUhgs9sJmA+48LXRQp6vO17NYlgmXM697FesqLBlswvyQUp7P0iGIU/5+hzpjMjM9AiPKQadqNiXREc4ozNG59/JLoL8dzcWw+FdhzRN+KBsqMdmLSV266V7/Zbpq1vXYkDAe9+zwjz8GOxU46ZZFAM/mLDv49E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725901034; c=relaxed/simple; bh=J2w2K0lUAL3GVwS593ZI7evihpgf7kEWCUm22fVj4Kg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=R26yLloEZYbV7spUhFFlGel9F7hg2QWWr/pIecg8ozBi4zK97kks+zKRoUCH8oHWJ539NjbXo5SMQhWQY2cp4b0vKgDqb43MfcKFSt0jrJuMRAI8lH4mhdWgzn2yoQOVT01bSO/IFwxl9Did7KXdJ5IR3oy3BhplztXZ2bv8JOo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725901033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZANTELDjnaEK03LXIIIRVNydkbWZwqE/upi2HsDojHE=; b=Rtd07eBaY4QVcXYDsqiJXLCWfW48zJOdc3VfMZVia2XBcBhRH5u4v3NqVVGIw9uUGTuXLq rjtfHO4psHa/XWMIlsvgeFmAM7nPiwcN/ULtmB6zwOwxpAXffHjep5Q/+uR+aFlV8df2Ea m7vJXjkGDu2ki2WIXmm2P8+iZoausos= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-CQUdp7OoP1CCKllk9ZVnlQ-1; Mon, 09 Sep 2024 12:57:12 -0400 X-MC-Unique: CQUdp7OoP1CCKllk9ZVnlQ-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42cb0b0514bso17496635e9.1 for ; Mon, 09 Sep 2024 09:57:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725901031; x=1726505831; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZANTELDjnaEK03LXIIIRVNydkbWZwqE/upi2HsDojHE=; b=ewXNf2PhzEs1b2kp/BWNwEwhs5Mpq/M3s1UfxdPw8Vp9aIMItrFbXrhzf61ISsMNhL Z41gJG//gK7Xn6JFfe8C5TG5KLAUANRkdV0rZY/K800n1yngAe906e3OcVqHhyHKMviA JkH272UsZYEQazvOdkOg5FSaNHg2FLuA7IDa0hVJd0slpJot+Jvki4UeylkYCLINhRe+ W7QTf7grHu+WXphnMbVitXNzpp1OQzahXFPTuodQQOZtK1CT/5ffSdrgZXFO2kFeGaX6 YTShkMzt/dvDbesz8/Ihr+6aSGi/ol1OZ0pTo9MEW8J/3c7Wt2zzPgcFXOXjpSeQIzyx PcXA== X-Forwarded-Encrypted: i=1; AJvYcCURgBMnzHOqjfGk7/Tj6g6LR8dAIDHIGXRY+KMR31ZpYwHNzm4x+sqB+tQwoD4hTPKkbBJvEFJKfozcmQ==@sourceware.org X-Gm-Message-State: AOJu0Yz9YuYyY41uP3Y0gdiIfJ9OX4UMrQxlqU7rPYoDYjh0EhsCnXt/ m39IYyYGUcIUwQkecskEDIT2KTI01hBI42jZFFTrnTtXEtCcoYla+5Ca1pUdxc5qM2LXxiTmdw1 G4fXCXStp+Vl+gQsWxYmqfkW/YxjyWqybk92S9pJnT48El/vCHr3UrxeHPROKOU4TmdE= X-Received: by 2002:a05:600c:4798:b0:42c:a574:6364 with SMTP id 5b1f17b1804b1-42ca574664amr70894045e9.12.1725901030593; Mon, 09 Sep 2024 09:57:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+vn/HczBLhSoOexG0p+dH4vUZcXpgfeRwmrVC8ZzhoQP71ZnLIpGzIanS9hvOzK0hC31Usg== X-Received: by 2002:a05:600c:4798:b0:42c:a574:6364 with SMTP id 5b1f17b1804b1-42ca574664amr70893605e9.12.1725901029449; Mon, 09 Sep 2024 09:57:09 -0700 (PDT) Received: from localhost (178.126.90.146.dyn.plus.net. [146.90.126.178]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42caeb8b7fcsm82503915e9.47.2024.09.09.09.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 09:57:09 -0700 (PDT) From: Andrew Burgess To: Tom de Vries , gdb-patches@sourceware.org Subject: Re: [PATCH] [gdb/testsuite] Handle missing curses in gdb.python/py-missing-debug.exp In-Reply-To: <87zfogrjtm.fsf@redhat.com> References: <20240907033713.4483-1-tdevries@suse.de> <87frq9swxc.fsf@redhat.com> <87zfogrjtm.fsf@redhat.com> Date: Mon, 09 Sep 2024 17:57:08 +0100 Message-ID: <87plpcrcij.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Andrew Burgess writes: > Tom de Vries writes: > >> On 9/8/24 22:38, Andrew Burgess wrote: >>> Tom de Vries writes: >>> >>>> On a system with python 3.6, module gdb.missing_debug imports module curses, >>>> so when running test-case gdb.python/py-missing-debug.exp on a system without >>>> that module installed, we run into: >>>> ... >>>> (gdb) source py-missing-debug.py^M >>>> Python Exception : Module 'curses' is not installed.^M >>>> Use:^M >>>> sudo zypper install python36-curses^M >>>> to install it.^M >>>> Error occurred in Python: Module 'curses' is not installed.^M >>>> Use:^M >>>> sudo zypper install python36-curses^M >>>> to install it.^M >>>> (gdb) FAIL: gdb.python/py-missing-debug.exp: source python script >>> >> >> Hi Andrew, >> >>> Do you know where the curses include is coming from? >>> >> >> Yes, from gdb/python/lib/gdb/missing_debug.py: >> ... >> if sys.version_info >= (3, 7): >> # Functions str.isascii() and str.isalnum are available starting Python >> # 3.7. >> def isascii(ch): >> return ch.isascii() >> >> def isalnum(ch): >> return ch.isalnum() >> >> else: >> # Fall back to curses.ascii.isascii() and curses.ascii.isalnum() for >> # earlier versions. >> from curses.ascii import isalnum, isascii >> ... > > Thanks for explaining this. I wonder if there's a way we could avoid > that dependency... I'll have a think about that one. I posted: https://inbox.sourceware.org/gdb-patches/7c515b37e2bf7ca319e76ebcbd3b16137d8919c3.1725900938.git.aburgess@redhat.com/T/#u Thanks, Andrew