[PATCH] Python3 compatible modules - credentials, param, _glue

Andrew Bartlett abartlet at samba.org
Mon Feb 27 19:01:11 UTC 2017


On Tue, 2017-02-28 at 07:19 +1300, Andrew Bartlett wrote:
> On Mon, 2017-02-27 at 13:01 +0100, Lumir Balhar wrote:
> > On 02/26/2017 10:21 AM, Andrew Bartlett wrote:
> > > On Sun, 2017-02-26 at 16:31 +1300, Andrew Bartlett wrote:
> > > > On Thu, 2017-02-23 at 20:38 +0100, Lumir Balhar wrote:
> > > > > So, from my point of view, it would be better to finalize
> > > > > Stefan's
> > > > > patch
> > > > > and merge it to master, and then I can rework my patchset
> > > > > (the
> > > > > last
> > > > > time, hopefully) to be compatible with the latest pytalloc
> > > > > API.
> > > > > 
> > > > > What do you think about it?
> > > > 
> > > > I've done that, it looked like I just need to reject the
> > > > changes
> > > > to
> > > > the
> > > > files with conflicts (those attempting a change to
> > > > PyCapsule).  I
> > > > hope
> > > > I've based it on your most recent work.  I'm running tests on
> > > > that
> > > > now.
> > > > 
> > > > git://git.samba.org/abartlet/samba.git py3
> > > > 
> > > > https://git.samba.org/?p=abartlet/samba.git/.git;a=shortlog;h=r
> > > > ef
> > > > s/he
> > > > ad
> > > > s/py3
> > > > 
> > > > I hope this means we are near the end of this road, and I thank
> > > > you
> > > > all
> > > > for your contributions and patience!
> > > > 
> > > > Let me know what you think, and I'll let you know what the
> > > > builds
> > > > come
> > > > up with, then I think we can get a review on this.
> > > 
> > > Our autobuild runs with strict compile options making warnings
> > > errors.
> > > 
> > > All the python3 builds fail on:
> > > 
> > > ../source4/libnet/py_net.c:722:2: error: missing braces around
> > > initializer [-Werror=missing-braces]
> > >    PyObject_HEAD_INIT(NULL) 0,
> > >    ^
> > > ../source4/libnet/py_net.c:722:2: error: (near initialization for
> > > py_net_Type.ob_base.ob_base) [-Werror=missing-braces]
> > > 
> > > The issue is that in python3 the first elements of PyTypeObject
> > > changes
> > > from inline to a sub-structure.
> > > 
> > > Andrew Bartlett
> > 
> > Hello.
> > 
> > I've updated the last patch in patchset to solve mentioned issue
> > in 
> > samba.net. New patch is attached.
> > 
> > There is no "missing braces" warning during build with this patch.
> > 
> > Thank you and have a nice day.
> > Lumír
> 
> Thanks.  So I understand, can you explain why this needs to be done
> here, while other types (the generated pidl ones) don't seem to need
> it?
> 
> I've manually patched it into my branch (please re-base your work on
> my
> branch for any further patches), and started some tests.
> 
> If you could carefully check my patch series and confirm you are
> happy
> with it (because some of the patches had a to be pretty seriously
> gutted once the PyCapsule idea went away), I think we can soon
> proceed
> to review!

This failed with errors found by our python code checker:

[1(0)/2037 at 0s] samba.tests.source
UNEXPECTED(failure):
samba.tests.source.samba.tests.source.TestSource.test_copyright(none)
REASON: Exception: Exception: Traceback (most recent call last):
  File
"/home/ubuntu/autobuild/b18929/samba/bin/python/samba/tests/source.py",
line 104, in test_copyright
    self.fail('\n'.join(help_text))
AssertionError: Some files have missing or incorrect copyright
statements.

/home/ubuntu/autobuild/b18929/samba/bin/python/samba/compat.py
    no copyright line found

/home/ubuntu/autobuild/b18929/samba/bin/python/samba/tests/dcerpc/raw_t
estcase.py
    no copyright line found

FAILED (1 failures, 0 errors and 0 unexpected successes in 0
testsuites)

Can you please run an autobuild on this?  The easy way to start is to
make a github pull request. While that will not run the main build's
make test, it will catch a few things I've had to reflect back to you
already, so it should save some round-trips.

Once you get that running, try:

./script/autobuild.py --testbase=/tmp

If you get oddities, note that the target platform is ubuntu 14.04,
with the packages per our wiki, but it isn't meant to be platform
specific.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list