Verify sysrepo-python compatibility with sysrepo 3.x/4.x devel branch#1
Verify sysrepo-python compatibility with sysrepo 3.x/4.x devel branch#1
Conversation
Co-authored-by: tbsuht <126770680+tbsuht@users.noreply.github.com>
Co-authored-by: tbsuht <126770680+tbsuht@users.noreply.github.com>
|
@copilot creating build/temp.linux-x86_64-cpython-313/build/temp.linux-x86_64-cpython-313 |
- Update version check to accept SO versions 7 and 8 - Replace SR_CONN_CACHE_RUNNING flag with sr_cache_running() function - Replace SR_CONN_CTX_SET_PRIV_PARSED with SR_CTX_SET_PRIV_PARSED and sr_context_options() - Add sr_context_flag_t enum to cdefs.h - Update COMPATIBILITY.md with SO version 8 changes Co-authored-by: tbsuht <126770680+tbsuht@users.noreply.github.com>
Fixed in commit 5d0eb94. The build errors were due to API changes in sysrepo SO version 8:
The wrapper now properly handles both SO version 7 (sysrepo 2.x/3.x) and SO version 8 (sysrepo 4.x devel). |
|
@copilot why did you remove flags |= lib.SR_CONN_CTX_SET_PRIV_PARSED |
In SO version 8, the connection API was redesigned: Why flags were changed to 0:
Why
Why
The new API separates global process-wide settings (context options, cache) from per-connection settings. This is why the flags parameter to |
Changes for SO Version 8
The devel branch (sysrepo 4.x) uses SO version 8 which introduced breaking changes:
SR_CONN_CACHE_RUNNINGflag removed → usesr_cache_running(enable)functionSR_CONN_CTX_SET_PRIV_PARSEDmoved to new enum → useSR_CTX_SET_PRIV_PARSEDwithsr_context_options()These changes maintain backward compatibility with SO version 7.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.