PATCH: python3 smb module

Andrew Bartlett abartlet at
Tue Feb 13 21:44:46 UTC 2018

On Tue, 2018-02-13 at 12:43 +0000, Noel Power via samba-technical
> I noticed I erroneously specified the smb_methods in the module def,
> this doesn't reflect how the previous python 2 code was using the
> Py_InitModule3 code. I've changed the patch accordingly
> On a sidenote I wonder should we change the api here for the smb module.
> I have noticed that loadfile (which although documented to load
> filecontents as a string) doesn't seem to handle content starting with
> unicode BOM :/ perhaps returning a byte string might be a better choice
> (for the python3 variant)
> I'm working on a test to demonstrate this but python2/python3 is fighting me

Aside from that (which I'll try and understand later) please ensure the
patch passes 'make test TESTS=source'.  


Andrew Bartlett
Andrew Bartlett
Authentication Developer, Samba Team
Samba Development and Support, Catalyst IT

More information about the samba-technical mailing list