Giter Site home page Giter Site logo

Comments (5)

seperman avatar seperman commented on August 15, 2024

What are you exactly trying to inspect in boto? I don't remember a self.loop in boto.
The test class you have made has a loop to itself so DeepDiff gets stuck in that loop since it tries to get to the bottom depth of your object,

from deepdiff.

jonapich avatar jonapich commented on August 15, 2024

I have seen this sort of design multiple times - i know pytest has it as well. Of course there's no explicit "loop", that's for the bug's purpose; the point is that Python supports such circular references but DeepDiff doesn't.

The boto class I'm trying to compare is the ElasticLoadBalancer attributes. The "Health Check" attribute has an access point attribute that also lists the health checks, and that's where the loop may exist.

Take for instance any hierarchical object; most of them will have a link to parent. If you enter parent, and re-enter the same child from parent, you can also create this "loop". It's a common idiom.

You might want to check how the json library handles this case when serializing custom objects. I know it has a switch to enable/disable recursion protection.

from deepdiff.

seperman avatar seperman commented on August 15, 2024

Great point. I'm adding loop detection.

from deepdiff.

seperman avatar seperman commented on August 15, 2024

I just added recursion detection and added some tests. Please let me know if you again run into issues with boto. DeepDiff v0.5.5

from deepdiff.

jonapich avatar jonapich commented on August 15, 2024

Bingo :) Thank you so much!

from deepdiff.

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.