Repository navigation
Conversation
jktjkt
force-pushed
the
fix/build-with-master
branch
3 times, most recently
from
September 23, 2026 17:15
76b9dfe to
97f9e1d
Compare
Due to the way how the tests runners and linters are set up, when `test_a.py` imported `test_b`, it would pass during regular test execution and fail with pylint. That ain't good. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Upstream libyang now unconditionally needs certain core YANG modules, and they are not available as builtins in the library. Load them via the usual lookups from disk instead. Since context creation without access to on-disk data is now broken, the tests which excercie this path have to first change to loading "a minimal context" with file lookup enabled, and then disable this feature via a newly wrapped function. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
...to the latest that we're testing against. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
And I have to add this line here just to make the CI happy, even though everything is in the first line. Oh well. Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
jktjkt
force-pushed
the
fix/build-with-master
branch
from
September 23, 2026 18:02
97f9e1d to
5d9a685
Compare
This was referenced Sep 23, 2026
Contributor
|
@rjarry @jeremie6wind @samuel-gauthier Any progress here? We would like to have the changes of this and the following PRs. |
jeremie6wind
pushed a commit
to jeremie6wind/libyang-python
that referenced
this pull request
Nov 27, 2026
Since libyang commit be5a07fea89d ("context UPDATE remove binary
internal modules"), ly_ctx_new() reads its internal modules from the
search dirs. So creating a context fails when ly_yang_module_dir() is
not one of them:
>>> libyang.Context()
libyang.util.LibyangError: cannot create context
Always add this dir at the end of the search path. User dirs are still
searched first, and libyang ignores a dir that is given twice.
ly_yang_module_dir() was added by the same libyang commit, and the
first release with it is v5.8.6, with soversion 5.5.5. So require this
version.
Closes: CESNET#172
Closes: CESNET#173
Suggested-by: Pepa Hajek <hajekpepa@gmail.com>
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
jeremie6wind
pushed a commit
to jeremie6wind/libyang-python
that referenced
this pull request
Nov 27, 2026
The result of the load_module() call is not used, because the call is expected to fail. No functional change. Closes: CESNET#173 Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz> Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is similar to #172, but it exposes users to the new behavior of the upstream library. The change upstream means that creating a
Contextwithout lookups of YANG schemas from disk is no longer possible. Rather than mask it, I wanted to make this obvious, so this PR adds support for enabling/disabling the file-based lookups after the context has been created.