Giter VIP home page Giter VIP logo

Comments (7)

Grokzen avatar Grokzen commented on July 21, 2024

@mrproper This thing has come up before and to fix it here in python i would have to hack inside pyyaml when using that within this lib to somehow hijack the data loading process or some other hook and then use that as a validator for the unique field. Because of this complexity do not expect this to be fixed any time soon. The only way this would be fixed right now is if someone else would submit a patch to pykwalify to implement this, otherwise this is very low down on my priority list.
This might not even be possible with pyyaml depending on how the internals work when it encounters the case above.

from pykwalify.

mrproper avatar mrproper commented on July 21, 2024

cool, thanks for the update, i expected as much but i thought id get it on here to at least track it at some point =)

Though i didnt think pykwalify was using pyaml, according to the front page:
"In release 1.6.0 PyYaml will be deprecated in favor of ruamel.yaml"

from pykwalify.

Grokzen avatar Grokzen commented on July 21, 2024

@mrproper When something is deprecated it is usually on the way out from the code but it is still in there for compatibility and support for a few versions until people have had enough time to switch over. It is not so good practise to just rip something that deep inside the core out just like that.

Ruamel.yaml have the same problem as i mentioned above. But with ruamel i have not yet looked at the code and if it would be possible to highjack the dict key loading code and make it compatible with the unique feature. The situation might be better but i can't promise anything.

from pykwalify.

Grokzen avatar Grokzen commented on July 21, 2024

@mrproper A update to this problem is that i might go back on the decision to remove pyyaml in next release as pyyaml have done a release a while back. It might just be that i will change the default yaml parser to ruamel yaml as it appears to be more active then pyyaml but both will still be supported in the code depending on what your needs are.

from pykwalify.

Grokzen avatar Grokzen commented on July 21, 2024

@mrproper I will close this issue as invalid becuase i see no way that i will be able to support this feature. As mentioned above this is a issue in pyyaml or ruamel yaml and it is not something that easily supported.

I do not really know how kwalify does this but if i would guess (without looking in the source code) i would guess that they might do a textual processing of the yaml files but this is not something that is good to do or even possible to support when you do the validation on data structures. There is no real case where you can have the exact same key twice in a python dict so this issue will not be possible to run anyway.

from pykwalify.

mrproper avatar mrproper commented on July 21, 2024

No worries @Grokzen, i included it because users/developers etc writing yaml have more than once on occasion added duplicate keys to a dict =), thanks for the communications though!

from pykwalify.

Grokzen avatar Grokzen commented on July 21, 2024

@mrproper Ye i can understand why this would be a issue if you yourself have no control over the supplied data.

from pykwalify.

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.