zbentley commented on PR #16535:
URL: https://github.com/apache/pulsar/pull/16535#issuecomment-1235955753

   @BewareMyPower I redid some of this work and pulled more logging related 
logic into pure Python, which is now passed as a callback function into the C++ 
code. That ends up having fewer issues, as many of the `boost::python` utility 
functions (like `import`) themselves run the various `PyErr` functions 
internally, which mutates the error state that is being relied upon by 
`asyncio` for that failing test.
   
   The code should be a little simpler now, though the line count went up 
(sorry). 
   
   Additionally, the `PyError_Restore` pattern added for the new logging code 
should probably be used for other "C++ calls python and shouldn't mess up 
pre-existing interpreter error state" hooks in `pulsar-client` (e.g. consumer 
message listeners and the like).


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to