GithubHelp home page GithubHelp logo

Comments (8)

JoseIgnacioTamayo avatar JoseIgnacioTamayo commented on June 15, 2024 1

After some retries, I was able to use pyangbind 0.8.3 from source, and it worked ok. The error presented itself only when using the PyPi package.

I created a Package 0.8.3.post1 with a fresh build from source. @gunhanoral , could you please try again?

from pyangbind.

gunhanoral avatar gunhanoral commented on June 15, 2024

Probably unrelated but when I tried to import from the file generated with docker-v0.8.2 using pyangbind v0.8.3 installed on my computer I got ModuleNotFoundError: No module named 'pyangbind.lib' error. After I downgrade to v0.8.2 I was able to import the same file without a problem.

from pyangbind.

xavier-contreras avatar xavier-contreras commented on June 15, 2024

Hello @gunhanoral , we are aware of some breakage and had yanked v0.8.3. @JoseIgnacioTamayo I noticed v0.8.3 was unyanked on PyPi, is the error here related to the original problem?

from pyangbind.

JoseIgnacioTamayo avatar JoseIgnacioTamayo commented on June 15, 2024

Interesting.

I updated the release notes of v0.8.3. Indeed, files generated with 0.8.2 depend on bitarray while files generated with 0.8.3 depend on pyangbind...YANGBinary. So indeed 0.8.3 is not backwards compatible.

I un-yanked the release because I was able to use and generate files. I did not had the error reported in here. I will try to reproduce it and maybe fix it.

The fact that 0.8.3 is not backwards-compatible, grants it to be yanked again until fixed? Maybe...

from pyangbind.

JoseIgnacioTamayo avatar JoseIgnacioTamayo commented on June 15, 2024

Yep, using oc_config_validate, I get the same error as reported. I yanked 0.8.3 again until:

  • This error is fixed
  • The release is backwards compatible (might be as simple as a importing bitarray library)

from pyangbind.

fperrin avatar fperrin commented on June 15, 2024

For the second problem:

I tried to import from the file generated with docker-v0.8.2 using pyangbind v0.8.3 installed on my computer I got ModuleNotFoundError: No module named 'pyangbind.lib' error

The bindings are not self-contained, they import some classes from pyangbind. In order to properly support the YANG bytes type, I've added a new class to map the type, and bindings now reference that new class; that's why the older pyangbind version can't be used with bindings generated by the new version.

I'd be very careful before promising that bindings generated by pyangbind version X can be used on a machine running pyangbind version Y. It'll mean you can't add or remove functions or classes referenced from bindings, or rename them, move to a different module, accept extra or fewer arguments, change their behaviour, etc.

To be perfectly honest, I hadn't thought about that sort of compatibility. I always used pyangbind to generate bindings at application startup time.

from pyangbind.

gunhanoral avatar gunhanoral commented on June 15, 2024

Build completes successfully. Thanks!
Also there's no problem with importing from the generated file.

from pyangbind.

JoseIgnacioTamayo avatar JoseIgnacioTamayo commented on June 15, 2024

Great! So the issue was just the package 0.8.3 in PyPi. Something went wrong when I built and uploaded it. The latest package 0.8.3.post1 works as intended.

from pyangbind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.