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

Lumir Balhar lbalhar at redhat.com
Mon Jan 30 15:59:31 UTC 2017


On 01/27/2017 07:17 AM, Andrew Bartlett wrote:
> On Sat, 2017-01-14 at 07:05 +1300, Andrew Bartlett wrote:
>> On Fri, 2017-01-13 at 12:01 +0100, Lumir Balhar wrote:
>>>> On 01/05/2017 07:10 PM, Andrew Bartlett wrote:
>>>>> On Thu, 2017-01-05 at 14:01 +0100, Lumir Balhar wrote:
>>>>>> On 12/22/2016 07:00 PM, Andrew Bartlett wrote:
>>>   [...]
>>>>>> Perhaps skip the raw DCE/RPC tests, add some expected value
>>>>>> testing
>>>>>> to
>>>>>> samba/tests/auth.py and run samba/tests/gensec.py?
>>>>>   Ok, I can skip tests of DCE/RPC and run tests of gensec but
>>>>> first I
>>>>> need
>>>>> to port samba.gensec module and samba.tests.gensec. It looks
>>>>> like
>>>>> that
>>>>> it will be simple without another dependency chain.
>>>>   Good!
>>>   
>>> It seems that my expectations were wrong. I found out that tests of
>>> the
>>> gensec module are planned old way with planoldpythontestsuite()
>>> function
>>> which is not prepared for Python 3 yet.
>>> Of course, I can port this functionality as well but I've
>>> discovered
>>> another long dependency chain which goes through modules getopt,
>>> hostconfig, dsdb, dsdb_dns and maybe more - so it will take some
>>> time
>>> to
>>> do it and it will add other changes to patchset.
>>>
>>> This is just a heads-up that the patchset will be even larger than
>>> expected, unless you see a different way forward.
>> I do.
>>
>> You should be able to prove to yourself that HostConfig is unused,
>> except for tests, but the easiest course of action is to remove
>> get_hostconfig() from the getopt.py script, as that is both unused
>> and
>> untested.
>>
>> The HostConfig abstraction never really took off, despite looking
>> like
>> a reasonable idea, so you can also remove the get_samdb() call from
>> it
>> as well if that is helpful somehow.
>>
>> That should cut down the dep chain for now.  When we get back to it,
>> it
>> looks like there is some other code here we should remove or finally
>> use.
> Do you have an updated patch set?  I'm hoping we can land this without
> a disastrous conflict with the --disable-python patch set, and it would
> be helpful to see the current state of play.
>
> Thanks,
>
> Andrew Bartlett
>

Hello.

Sorry for later reply but I was on DevConf in Brno and I was a bit sick 
before it.

Here is updated patchset. It contains a lot of changes discussed before, 
fixes, new tests and more.

Commit fc31cd9 (patch 12) adds one static function to the header file 
py3compat.h, which is not the best but I cannot find a better solution 
here because I need to redefine two function calls and I can't do it 
just with macro. Another possible solution for this problem is to use 
#if/#else/#endif everywhere is PyCObject_FromVoidPtrAndDesc used 
(including in the PIDL generator).

I hope that everything will be good for you.

Have a nice day.
Lumír
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0027-python-selftest-Add-possibility-to-run-old-Python-te.patch
Type: text/x-patch
Size: 3175 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0027-python-selftest-Add-possibility-to-run-old-Python-te-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0026-python-samba.gensec-Port-module-to-Python-3-compatib.patch
Type: text/x-patch
Size: 10918 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0026-python-samba.gensec-Port-module-to-Python-3-compatib-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0025-python-samba.gensec-Fix-error-handling-in-set_creden.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0025-python-samba.gensec-Fix-error-handling-in-set_creden-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0024-python-selftests-Enable-samba.getopt-tests-execution.patch
Type: text/x-patch
Size: 1124 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0024-python-selftests-Enable-samba.getopt-tests-execution-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0023-python-samba.getopt-Port-module-to-Python-3-compatib.patch
Type: text/x-patch
Size: 1917 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0023-python-samba.getopt-Port-module-to-Python-3-compatib-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0022-python-samba.tests.core-Port-and-enable-core-tests-i.patch
Type: text/x-patch
Size: 2090 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0022-python-samba.tests.core-Port-and-enable-core-tests-i-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0021-python-samba.tests-Move-import-of-ported-modules-out.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0021-python-samba.tests-Move-import-of-ported-modules-out-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0020-python-samba._ldb-Port-of-samba._ldb-to-Python-3-com.patch
Type: text/x-patch
Size: 3625 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0020-python-samba._ldb-Port-of-samba._ldb-to-Python-3-com-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0019-python-samba.tests.auth-Add-tests-for-samba.auth-mod.patch
Type: text/x-patch
Size: 2274 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0019-python-samba.tests.auth-Add-tests-for-samba.auth-mod-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0018-python-samba.auth-Port-samba.auth-to-Python-3-compat.patch
Type: text/x-patch
Size: 5433 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0018-python-samba.auth-Port-samba.auth-to-Python-3-compat-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0017-python-wscript_build-Build-some-DCE-RPC-modules-with.patch
Type: text/x-patch
Size: 6003 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0017-python-wscript_build-Build-some-DCE-RPC-modules-with-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0016-python-samba.dcerpc-Port-security-module-to-Python-3.patch
Type: text/x-patch
Size: 3628 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0016-python-samba.dcerpc-Port-security-module-to-Python-3-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0015-python-samba.tests.dcerpc.misc-Port-and-enable-tests.patch
Type: text/x-patch
Size: 2390 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0015-python-samba.tests.dcerpc.misc-Port-and-enable-tests-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-python-samba.dcerpc-Port-RPC-related-stuff-to-Python.patch
Type: text/x-patch
Size: 15513 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0014-python-samba.dcerpc-Port-RPC-related-stuff-to-Python-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-python-pidl-Port-Python-interface-generator.patch
Type: text/x-patch
Size: 15884 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0013-python-pidl-Port-Python-interface-generator-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-python-Add-PyCapsule-related-macros-and-function-to-.patch
Type: text/x-patch
Size: 2509 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0012-python-Add-PyCapsule-related-macros-and-function-to--0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-pytalloc-Add-new-function-pytalloc_PyCapsule_FromTal.patch
Type: text/x-patch
Size: 2767 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0011-pytalloc-Add-new-function-pytalloc_PyCapsule_FromTal-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-python-samba.tests-Enable-Python-3-tests-for-ported-.patch
Type: text/x-patch
Size: 2017 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0010-python-samba.tests-Enable-Python-3-tests-for-ported--0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-python-wscript_build-Build-some-modules-for-Python-3.patch
Type: text/x-patch
Size: 3342 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0009-python-wscript_build-Build-some-modules-for-Python-3-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-python-Make-top-level-samba-modules-Python-3.patch
Type: text/x-patch
Size: 8363 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0008-python-Make-top-level-samba-modules-Python-3-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-python-samba.tests.dcerpc-Move-Class-RawDCERPCTest-t.patch
Type: text/x-patch
Size: 72683 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0007-python-samba.tests.dcerpc-Move-Class-RawDCERPCTest-t-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-python-samba.tests.glue-Add-new-tests-for-samba._glu.patch
Type: text/x-patch
Size: 3409 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0006-python-samba.tests.glue-Add-new-tests-for-samba._glu-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-python-samba._glue-Port-samba._glue-module-to-Python.patch
Type: text/x-patch
Size: 3280 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0005-python-samba._glue-Port-samba._glue-module-to-Python-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-python-samba.tests.param-Add-missing-tests.patch
Type: text/x-patch
Size: 2687 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0004-python-samba.tests.param-Add-missing-tests-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-python-samba.param-Port-param-module-to-Python-3.patch
Type: text/x-patch
Size: 13651 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0003-python-samba.param-Port-param-module-to-Python-3-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-python-samba.tests.credentials-Python-3-compatible-t.patch
Type: text/x-patch
Size: 5662 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0002-python-samba.tests.credentials-Python-3-compatible-t-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-samba.credentials-Port-pycredentials.c-to-Pyt.patch
Type: text/x-patch
Size: 2899 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170130/6b32e44f/0001-python-samba.credentials-Port-pycredentials.c-to-Pyt-0001.bin>


More information about the samba-technical mailing list