[ 
https://issues.apache.org/jira/browse/PROTON-2095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17358623#comment-17358623
 ] 

ASF GitHub Bot commented on PROTON-2095:
----------------------------------------

astitcher commented on pull request #318:
URL: https://github.com/apache/qpid-proton/pull/318#issuecomment-855955069


   > > I think that the cffi binding should be a drop in replacement for import 
cproton as there a number of places where this is used.
   > 
   > My thinking was that the `cproton` module is internal API that does not 
have to be preserved. The only external use of the API that I am aware of are 
these two tests in Qpid Dispatch, 
https://github.com/apache/qpid-dispatch/search?l=Python&q=cproton
   
   I think there is some confusion here about internal vs external use of the 
API. The testing I'm thinking of is indeed inside the python test suite, but 
these tests actually test the c code not the python code.
   In any case, My point is about better layering for the python library. Which 
will affect the maintainability of the code more than anything else. So it'll 
be easier to debug/modify and generally evolve over time if it has better 
layering:
   Keeping the details of ffi outside the top level python binding code will it 
seems to me make it much easier to evolve this code over time in many ways.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Move away from SWIG to CFFI
> ---------------------------
>
>                 Key: PROTON-2095
>                 URL: https://issues.apache.org/jira/browse/PROTON-2095
>             Project: Qpid Proton
>          Issue Type: Wish
>          Components: python-binding
>    Affects Versions: proton-c-future, proton-c-0.29.0
>            Reporter: Omer Katz
>            Assignee: Arunagirinadan Sudharshan
>            Priority: Major
>             Fix For: proton-c-future
>
>
> SWIG is fine but we're not using it for anything other than exporting all of 
> proton-c's API as is.
> Unfortunately SWIG only generates CPython extension bindings. This may be a 
> problem on PyPy where CPython extensions are either slow or simply won't 
> compile.
> Unlike SWIG, CFFI is portable both on CPython and PyPy.
> It also satisfies the same requirements as SWIG currently does.
> In addition, calls to CFFI simply release the GIL which will help 
> parallelizing Python applications using threads.
> By using CFFI we can also get rid of all of our setup.py code and simply use 
> it to build the extension. We will also no longer have problems building 
> wheels.
> The newest version of CFFI supports pkg-config so we can use that to find 
> proton-c easily.
> I'm willing to help with the refactor but I'll need a mentor since I'm not 
> familiar with the code base.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to