URL: https://github.com/SSSD/sssd/pull/369
Title: #369: pysss_nss_idmap: remove unnecessary python2/3 ifdef

sumit-bose commented:
"""
>In my test using 'bytes' with python2 and python3 by just removing the #ifdef 
>and >PyModule_AddStringConstant() calls from 
>9375eae59550437c85ada9212be430a4242b25a4 works as well in my testing.

Current solution works as well but it's nicer to get rid of unnecessary 
"#ifdefs"

>After talking with python developers it seems to me that using strings/unicode 
>here is more the python >way of doing things.

Thank you for checking it with python guys. I was not sure about string/bytes; 
I just wanted to be closer to old python2 behaviour

> It would be possible to force users to only use the constants defined by the 
> module but this would require defining our own class for the keys which imo 
> is too much for this simple use case.  So ACK.

I noticed that we can assign value to `pysss_nss_idmap.SID_KEY`.  But creating 
new class might break old clients. Next time we can consult API of module with 
them :-)

"""

See the full comment at 
https://github.com/SSSD/sssd/pull/369#issuecomment-328540887
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to