You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am troubleshooting an issue, which is definitely related to v3 vs v4. The issue is coming from one of the tests of libyang-python project. It uses JSON file which defines usage of single testing module in it using legacy or deprecated syntax.
Originally I thought that this is somehow related to skipping of compilation of obsolete items or different ordering, but it doesn't seems so. I have tried to troubleshoot the calls and it seems that it is not able to find xpath modules-state/module for some reason, which I am not able to understand why.
Anyhow I have created a commit, which introduces a test that is working in v3 but not in v4 (#2456).
if possible, please take a look and let me know if this is really a bug on libyang side or if we need adjust libyang-python in a way, that it will no longer support the legacy way?
The assumption is you either have the newer YANG module and have the new YANG data or the old YANG module and the legacy data. Your use-case is having the new YANG module with the legacy data, which was not really expected. But I guess this is exactly why the legacy data were kept in the new YANG module in the first place, so I have fixed it.
Activity
context BUGFIX unexpected context node
michalvasko commentedon Dec 11, 2025
The assumption is you either have the newer YANG module and have the new YANG data or the old YANG module and the legacy data. Your use-case is having the new YANG module with the legacy data, which was not really expected. But I guess this is exactly why the legacy data were kept in the new YANG module in the first place, so I have fixed it.
steweg commentedon Dec 11, 2025
Thanks, for the fix. I am not sure either if this is valid use-case as the test is coming from relatively old unit test of
libyang-python.context BUGFIX unexpected context node