[PATCH] Python3 compatible modules - credentials, param, _glue
abartlet at samba.org
Tue Feb 21 22:10:00 UTC 2017
On Tue, 2017-02-21 at 11:08 +0100, Lumir Balhar wrote:
> I completely understand that there are several customers with Python
> and we still have to support them.
> Patch 12 in the previous patchset  was designed to keep Python
> compatibility by redefining PyCapsule_* functions with PyCObject
> alternatives which is a simple solution without much impact on
> Also, the whole codebase can be developed and maintained with
> only which is better for clear code and future maintainability.
> Then, when we'll decide to drop Python 2.6 support we just need to
> delete this macros/function from py3compat.h file and continue with
> PyCapsule only.
> Or we can redesign the API using something like the proposed
> pytalloc_GenericObject. However, given our currently limited use of
> CObject, I think this would need more discussion about the intended
> direction of this API before going to redesign it. CObject currently
> works, and PyCapsule is the obvious replacement, so I believe a
> for porting to Python 3 should use PyCapsule.
What more needs to be done. I think porting fully to PyCapsule with a
emulation layer is the correct approach, and would avoid the uglier
changes in the PIDL generated code.
> If you agree, I'll try to add the mentioned changes back to the
> patchset, I'll remove version 2.7 check and I'll test it as far as I
> with Python 2.6.
The issue I had is that when build with --enable-developer on modern
GCC, it failed to compile because the macros conflicted with those
already provided by Python 2.7.
Therefore and regardless, I would also like it to use PyCapsule
directly on Python 2.7.
>  https://lists.samba.org/archive/samba-technical/2017-
Thanks Lumír for all your hard work on this. Hopefully we can make
More information about the samba-technical