linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Gibson <warthog618@gmail.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-gpio@vger.kernel.org
Subject: Re: [libgpiod v2][PATCH v3 0/4] bindings: implement python bindings for libgpiod v2
Date: Wed, 12 Oct 2022 21:03:02 +0800	[thread overview]
Message-ID: <Y0a7BrPiIAzwYuwH@sol> (raw)
In-Reply-To: <CAMRc=McbAx+m5cm-8gYX7sf-2HT655NqwfxwwG-QycKbRaS0Ww@mail.gmail.com>

On Wed, Oct 12, 2022 at 02:51:09PM +0200, Bartosz Golaszewski wrote:
> On Wed, Oct 12, 2022 at 2:42 PM Kent Gibson <warthog618@gmail.com> wrote:
> >
> > On Wed, Oct 12, 2022 at 02:34:44PM +0200, Bartosz Golaszewski wrote:
> > > On Fri, Oct 7, 2022 at 4:55 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > >
> > > > This is the third iteration of python bindings for libgpiod but it really has
> > > > very little in common with the previous version.
> > > >
> > > > This time the code has been split into high-level python and low-level
> > > > C layers with the latter only doing the bare minimum.
> > > >
> > > > The data model is mostly based on the C++ one with the main difference
> > > > being utilizing dynamic typing and keyword arguments in place of the
> > > > builder pattern. That allows us to reduce the number of methods and
> > > > objects.
> > > >
> > > > Because python doesn't have RAII, unlike C++, we provide a module-level
> > > > request_lines() helper as gpiod.Chip(path).request_lines(...) one-liner
> > > > could lead to the chip left dangling even after the last reference is
> > > > dropped.
> > > >
> > > > Because python forces us to dynamically allocate objects all the time even
> > > > for fundamental types (which are also immutable) there's no point in trying
> > > > to replicate the edge-event buffer. Instead LineRequest.read_edge_event()
> > > > just returns a list of events.
> > > >
> > > > Bartosz Golaszewski (4):
> > > >
> > >
> > > I fixed the one nit from Andy. If there are no objections I'd like to
> > > apply this and squash the entire v2 patch series into one big commit
> > > and apply it to the master branch. This way we can stop keeping this
> > > temporary branch and continue the development (tools, rust, possible
> > > further tweaks to the API) on master.
> > >
> >
> > I'm in the process of reviewing, so hold off for a bit if you can.
> >
> > If not, at the very least  IIIIpdII -> IIIIpkII in patch 4.
> >
> > Otherwise you get this on 32 bit platforms:
> >
> > $ gpioget.py /dev/gpiochip0 17
> > *** stack smashing detected ***: terminated
> >
> 
> I'll wait in this case, thanks. Wanted to start testing the new tools
> but thought about getting this behind us first.
> 

The idea of getting the tools patch out was to keep you busy while I
reviewed the python. Unfortunately I got bogged down in corner cases so
that took much longer to get out than I had intended.

I only started looking at the python today, and I don't want to commit
to a completion time at this stage, but shouldn't be too long.

So go play with the tools for a bit.

Cheers,
Kent.

      reply	other threads:[~2022-10-12 13:03 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-07 14:55 [libgpiod v2][PATCH v3 0/4] bindings: implement python bindings for libgpiod v2 Bartosz Golaszewski
2022-10-07 14:55 ` [libgpiod v2][PATCH v3 1/4] bindings: python: remove old version Bartosz Golaszewski
2022-10-07 14:55 ` [libgpiod v2][PATCH v3 2/4] bindings: python: add examples Bartosz Golaszewski
2022-10-13  3:09   ` Kent Gibson
2022-10-17 12:00     ` Bartosz Golaszewski
2022-10-17 12:11       ` Kent Gibson
2022-10-17 13:49         ` Andy Shevchenko
2022-10-17 14:07           ` Kent Gibson
2022-10-17 14:19             ` Andy Shevchenko
2022-10-17 15:53               ` Bartosz Golaszewski
2022-10-17 16:09                 ` Kent Gibson
2022-10-17 16:20                   ` Kent Gibson
2022-10-17 16:55                     ` Andy Shevchenko
2022-10-17 16:57                       ` Andy Shevchenko
2022-10-17 17:26                         ` Bartosz Golaszewski
2022-10-17 16:24                 ` Andy Shevchenko
2022-10-17 16:39                   ` Kent Gibson
2022-10-07 14:55 ` [libgpiod v2][PATCH v3 3/4] bindings: python: add tests Bartosz Golaszewski
2022-10-13  3:09   ` Kent Gibson
2022-10-07 14:55 ` [libgpiod v2][PATCH v3 4/4] bindings: python: implement python bindings for libgpiod v2 Bartosz Golaszewski
2022-10-07 15:26   ` Andy Shevchenko
2022-10-07 18:19     ` Bartosz Golaszewski
2022-10-13  3:10   ` Kent Gibson
2022-10-13 11:12     ` Kent Gibson
2022-10-26 12:32     ` Bartosz Golaszewski
2022-10-26 12:56       ` Kent Gibson
2022-10-12 12:34 ` [libgpiod v2][PATCH v3 0/4] bindings: " Bartosz Golaszewski
2022-10-12 12:41   ` Kent Gibson
2022-10-12 12:51     ` Bartosz Golaszewski
2022-10-12 13:03       ` Kent Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y0a7BrPiIAzwYuwH@sol \
    --to=warthog618@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).