PATCH: python3 smb module

Noel Power nopower at
Tue Feb 13 12:43:51 UTC 2018

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

On 12/02/18 15:30, David Mulder wrote:
> Noel's patch, plus a test case that runs on both py2 and py3.
> On 01/17/2018 03:32 AM, Noel Power via samba-technical wrote:
>> Before Christmas playing with something where I needed to play with
>> samba + python3 I found the smb module was not ported, I scratched
>> together a patch (and forgot about it 'till the recent python3 porting
>> messages :-)) Please have a look, comments and corrections welcome
>> Noel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.patch
Type: text/x-patch
Size: 6507 bytes
Desc: not available
URL: <>

More information about the samba-technical mailing list