Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1292713pxb; Sun, 19 Sep 2021 12:23:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4UVmbbAcJOyEjsMBI0gmpLV7mOxREdplaJPXJdnaL40N54Vpg8YuLWa1kqZs4uBuHIxNS X-Received: by 2002:a17:906:ecf4:: with SMTP id qt20mr24152129ejb.375.1632079404485; Sun, 19 Sep 2021 12:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632079404; cv=none; d=google.com; s=arc-20160816; b=bWxbCut+chDdbNZmczqymoNCSDeAFojvFXsQtKv4O6/yHYVBjEoUBPmTA8yV9FT0Aa BIQB1FFnIQV6qiHAkgVoK6PiBmKr/5lg6NzI8IKjTJ3XYjIWin4mZKZBsgX5MuIimm0Q nBhwPSNqmJOxzbmzWWFeteYCKJWyvpeAXG00kaeGts0mEwxHWZCEMjoLMvuraxgFg5Hm aveLaIvyDYYwq2o7r7oBAnGu/0g5yAArulfxzleZRkPYQ1LaxwLSBHS+Yk0BVBnuTqRn bjcjGCJrp3g0YMcgCLSSytdToTtf4VkY7d39CEjd6pOuaz6fTp+CKhlYDueXYgWgZH2+ kiQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6exTQj2H8K+ahbQLkHM9yRcZGgvoa3LOgXfJ3HggxwQ=; b=mwRf2N1TJAZNZIqg6/h5hbvyyRf7hp63+RhvI4bfFVdfaoevht9ZlTZgc2yShq9B95 ebWb60MNxXXX4MNywKyDzF+cGGqmR0hPA1PNjYPaj6868E1C7yLlcfOGX+PuwVBs9/4k ZApyTMbo+IwGZOqjmCQ5S+L8HuJI184rb+f35dhAD9XyxlDUnBHlj8QLGjEaT+rZeg30 MqYqIlej8lmONbn2bMlMxJUK+K2T9ljMTxwj1sNHFjXPUnzpVPNArvnLPXwHh/tYsUJG 2TPMpVU3S3/gD15/YvL8Wv6Ux/f+mIZX+OBg42JuChEmv3LG+swUsaLkf83vskvz1DUU ekhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U48E6hmW; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-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. [23.128.96.18]) by mx.google.com with ESMTP id 16si14150823eji.352.2021.09.19.12.22.37; Sun, 19 Sep 2021 12:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U48E6hmW; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-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 S231244AbhISNq6 (ORCPT + 99 others); Sun, 19 Sep 2021 09:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230520AbhISNq6 (ORCPT ); Sun, 19 Sep 2021 09:46:58 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F4DFC061574 for ; Sun, 19 Sep 2021 06:45:33 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id eg28so27007028edb.1 for ; Sun, 19 Sep 2021 06:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6exTQj2H8K+ahbQLkHM9yRcZGgvoa3LOgXfJ3HggxwQ=; b=U48E6hmW45ep5MWXSmELGCeEnx1aJV0XG2i7asG9sJ41X3A4wef5PFhqqvTnwc02a3 nh8InO3tqg8ilbWomLwYnIuiiti6zegkiSscx4z2jappgilFMK0Tu3W/1L3WBd/A+909 5ChMXiYXw6Ww8N3iNKUzbr+QMRHikMhDLR7dUANph8dMHb3ssd85UTkb05g7H/PuZO4Q 8bjQGTgAjafrq++J96Afs7REKKbG+2p4Qny/BWjYXYStvFFLiw19Mbpg9ufOoxiftIto Mo2Y8RP3HS3pM737FuIV6tOByyQwaeKuWZzkh9kt8TWHtRgMT4XY9a6gtAqJhEJY92Yr i7Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6exTQj2H8K+ahbQLkHM9yRcZGgvoa3LOgXfJ3HggxwQ=; b=02j50CFF2vTA9RH2M6UUuNNH2Sb0uzzmbqTwKZPjPJQ6pnpRSubM0CMNNYKfEmfQqH 2rYCJnxj4/esBR6skT1SXbXbq6BugDQ0eGMCxe58wGr+0937byS4+DHzHQBdeykI7d5a ftYf1nVgHK1rV3u4vCteibH05VJBxV1/ppLoC3u4MsC9QuZ37jNaT1ZTcapxXnJw9YLJ a9c9mw5BTRr76shKfjTb2sN6eUA8zfD+OTSNiooqIm74O1mYuYkZ4W+4mb5RTpNJoNif ZNC7mGjl/aHFDVyM9IjDcGCO46hWJF68oOwTcBkYJxyFtZS/XIPSw/Znw5X30IdEeAq1 HJ9A== X-Gm-Message-State: AOAM530exgt0zDBMcq/MF0pR7w8Uuz5XOjbnS4WsG++NAZ0IzdbJ5dGH p39qSM1KhULtmZahQYTZ04ItRRQwKKF+XNQmm1ERb1TmsXs= X-Received: by 2002:a50:fa89:: with SMTP id w9mr24432490edr.113.1632059131507; Sun, 19 Sep 2021 06:45:31 -0700 (PDT) MIME-Version: 1.0 References: <20210917080436.hjs3fsezznlqcxay@SoMainline.org> In-Reply-To: <20210917080436.hjs3fsezznlqcxay@SoMainline.org> From: Barry Byford <31baz66@gmail.com> Date: Sun, 19 Sep 2021 14:45:20 +0100 Message-ID: Subject: Re: Deprecated Python Libraries To: Marijn Suijten Cc: Bluez mailing list , Sanchayan Maity , Sanchayan Maity Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hello Marijn, On Fri, 17 Sept 2021 at 09:04, Marijn Suijten wrote: > > Hi Barry, > > On 2021-09-17 08:03:36, Barry Byford wrote: > > The Python examples in the test directory have some dependencies that > > have issues: > > [..] > > Would there be any interest in getting patches to change to these > > different libraries? > > Are these test scripts used in any of the automated tests? > > Can I submit a PR via https://github.com/bluez/bluez/pulls? > > Perhaps of relevance: Sanchayan (cc'd) imporved some scripts for Python > 3 compatibility (Python 2 is already deprecated for the better part of > 1.5 years) and proper formatting [1] while working on BT LDAC [2], some > patches made it to the list [3] but were ultimately never merged. > Sanchayan, would you be willing to resubmit these? Alternatively Barry > can pick them up as part of their quest to improve the scripts for > longevity? > > Disclaimer: I'm not a maintainer, merely a passer-by so don't take my > comment as an acknowledgement to go ahead with the changes. But if you > do I think everyone appreciates improved shebangs and PEP8 style > formatting (I find `black` to perform formatting nicely) along the way > just like Sanchayan's patches. > > [1]: https://gitlab.freedesktop.org/SanchayanMaity/bluez/-/commits/python3/ > [2]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1621 > [3]: https://lore.kernel.org/linux-bluetooth/?q=sanchayan > Thanks for the feedback and references. I'm not quite sure of the purpose of the the Python scripts in the test directory. Do they serve the automated tests? In which case any changes need to be carefully considered. Or are they a base for people to interactively test BlueZ and see how to do an implementation with the D-Bus API. The use of bluezutils.py file seems to be inconsistent so I'm not sure if it is preferred or not. I regularly refer people to the Python scripts as an example of using the BlueZ D-Bus APi and that is my motivation for wanting to see them be improved. I've taken a look at moving the test-adapter script across to the Gio bindings and argparse. This meant updating the bluezutils.py also. Once I started restructuring things I may have got slightly carried away. I've also added some functionality such as being able to Introspect the interface. Anyway, the result of my experiment is at: https://github.com/ukBaz/bluez/commit/44f9c205f798232f9417879401b2baefa1ef01ac Any guidance from the maintainers as to what is required of the Python scripts in the test directory would be appreciated. Are there any scripts in the directory that you think are good examples of what you are looking for? Regards, Barry > Thanks! > - Marijn