Skip to content

data: option to allow json int/bool as strings #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bradh352
Copy link
Contributor

@bradh352 bradh352 commented Feb 16, 2025

Depends on libyang 3.12.2 or higher

Add support for new option to python bindings.

bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 16, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 16, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 16, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 16, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 16, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 16, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 16, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
@bradh352
Copy link
Contributor Author

CESNET/libyang#2344 has now been merged, just forced a rebuild of this to show tests pass.

@bradh352
Copy link
Contributor Author

I guess it must be pulling from master instead of devel when building C libyang .... so still failing

bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 17, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 20, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 20, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 21, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 25, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 25, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 25, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 25, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Feb 28, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 1, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 1, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 3, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 4, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 5, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 5, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 5, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 5, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Mar 6, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Apr 3, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Apr 3, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Apr 20, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Apr 22, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Apr 23, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Apr 24, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 13, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 13, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 13, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 13, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 13, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
@bradh352
Copy link
Contributor Author

@rjarry can you review, approve, and merge?

bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 14, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 15, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
bradh352 added a commit to bradh352/sonic-buildimage that referenced this pull request Jun 15, 2025
CESNET/libyang-python#134

needed for backwards compatibility for existing configurations.
@bradh352
Copy link
Contributor Author

@rjarry @samuel-gauthier any chance one of you can review?

@rjarry
Copy link
Collaborator

rjarry commented Jun 29, 2025

Is the feature available in a public release of libyang? If so, please change the minimum required version here:

#if (LY_VERSION_MAJOR != 3)

Otherwise we need to wait for a release.

@bradh352
Copy link
Contributor Author

Yes, available as of the official 3.12.2 release. I'll update this PR with that, but the other PR I have open I can't really update that to without conflict. Both depend on the same 3.12.2 however (technically, it was introduced in the 3.7 series but no official release was made for those).

@bradh352 bradh352 force-pushed the json_strings branch 2 times, most recently from a212ca0 to c127f99 Compare June 29, 2025 21:29
cffi/source.c Outdated
Comment on lines 9 to 10
#if (LY_PROJ_VERSION_MAJOR != 3 || LY_PROJ_VERSION_MINOR < 12)
#error "This version of libyang bindings only works with libyang 3.12+"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LY_PROJ_VERSION_* constants are only recent. Could you keep the test on LY_VERSION_* so that error messages are useful when building with ancient libyang versions?

Also, as you said, your series depends on CESNET/libyang@2d477f52d5c8 (I may be wrong about the exact SOVERSION, please do verify my claim).

Even if it wasn't an official tagged release, you can still depend on that specific version.

#if (LY_VERSION_MAJOR != 3 || LY_VERSION_MINOR < 8)
#error "This version of libyang bindings only works with libyang 3.8+"
#endif

@bradh352 bradh352 force-pushed the json_strings branch 3 times, most recently from 810f744 to e3467e6 Compare July 6, 2025 21:11
Depends on CESNET/libyang#2344

Add support for new option to python bindings.

Signed-off-by: Brad House <[email protected]>
@bradh352
Copy link
Contributor Author

bradh352 commented Jul 6, 2025

@rjarry sorry for the delay, got busy. Fixed the version check as per your request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants