libpython-clj icon indicating copy to clipboard operation
libpython-clj copied to clipboard

test: add context manager tests for __enter__ behavior

Open lidorcg opened this issue 2 months ago • 2 comments

fix: update 'with' macro to bind return value of __enter__ correctly

https://github.com/clj-python/libpython-clj/issues/273

lidorcg avatar Nov 11 '25 09:11 lidorcg

Good catch. Technically this is a backwards breaking change but I sincerely doubt anyone is explicitly expecting the bound/return value to always be nil and taking conditional logic from that.

Traveling right now for conference stuff but I will pull it and check it when I can.

Thanks for the contribution!

jjtolton avatar Nov 11 '25 11:11 jjtolton

@lidorcg overall looks good to me. Tested locally and working great. Would prefer you revert the unrelated formatting changes and do that in separate PR. Excellent contribution, thank you!

jjtolton avatar Nov 30 '25 22:11 jjtolton