[PATCH] samba.registry Python 3 compatible and Python 2.6 fixes

Lumir Balhar lbalhar at redhat.com
Thu Oct 12 09:30:28 UTC 2017


Hello.

I ported another Python module, samba.registry, to Python 3 compatible 
form (patch #1) and I improved its test coverage (patch #2).

Everything went well with Python 2.7 and 3.6 but then I found some 
issues during testing the ported module with Python 2.6.6 in VM with 
fresh CentOS 6 installation.
The second two patches contain fixes for Python 2.6.

The first problem I found is in lib/pam_wrapper/python/pypamtest.c where 
function PyErr_NewExceptionWithDoc is used, but this function is 
available only in Python 2.7 and higher. This bug was probably hidden 
because pam_wrapper can be installed as a distribution package. Fixed 
with #if/#else in patch 3.

The second one is in testsuite/unittests/rpc_test_dummy_module.c where I 
get an error about undefined kill() function and SIGKILL constant. I 
don't know where this bug comes from, but including signal.h header file 
fixes it. Fix attached as patch 4.

Thank you and have a nice day.

Lumír

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-unittests-Fix-missing-include-of-signal.h.patch
Type: text/x-patch
Size: 746 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171012/c37de06f/0004-unittests-Fix-missing-include-of-signal.h.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-python-Fix-Python-2.6-compatibility.patch
Type: text/x-patch
Size: 1257 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171012/c37de06f/0003-python-Fix-Python-2.6-compatibility.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-tests-Improve-tests-of-samba.registry-Python-module.patch
Type: text/x-patch
Size: 2903 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171012/c37de06f/0002-tests-Improve-tests-of-samba.registry-Python-module.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-python-Port-samba.registry-module-to-Python-3-compat.patch
Type: text/x-patch
Size: 4087 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20171012/c37de06f/0001-python-Port-samba.registry-module-to-Python-3-compat.bin>


More information about the samba-technical mailing list