[PATCH] provision: use ASCII quotes

Noel Power nopower at suse.com
Wed Mar 13 13:17:59 UTC 2019


On 13/03/2019 10:44, Douglas Bagnall wrote:
> Noel Power wrote:
>
>> lgtm - on a side note Douglas we already talked about this before when
>> we came across some similar issue and you did some code analysis on
>> existing open vs io.open (under python2).
> Yes. Perhaps I did. Obviously is io.open defaults to unicode, 
> and there is this:
>
> https://gitlab.com/samba-team/devel/samba/commit/2e231541b48fc97ca013079585ef556efda6cb95
>
> but all those subtleties... who cares any more if py2 is gone?

well there is 4.10 :-) but that is another story and I'd say wait and
see for that. This issue here is more about python3 the builtin 'open'
function behaviour and the fact that without specifying the encoding
(and with the default mode being text) the encoding defaults to the
current locale encoding causing this problem. I'm wondering should we
start now specifying  'utf8' encoding in open (builtin & io.open) but
yeah in either  case there are many subtleties which make it hehe a bit
daunting. iirc there were similar problems with some of the gpo code
when it got ported to python3

Noel




More information about the samba-technical mailing list