Skip to content
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

Marshall out iterables as lists in CPython #10894

Merged
merged 3 commits into from
Jul 15, 2020

Conversation

mmisol
Copy link
Collaborator

@mmisol mmisol commented Jul 15, 2020

Purpose

Adds support for marshalling out iterables that are not lists or
dictionaries using the CPython engine. In order to achieve this, the
check PyIter.IsIterable was used, along with some extra considerations,
mentioned in the source with comments.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.

Reviewers

@mjkkirschner

FYIs

@DynamoDS/dynamo

mmisol added 3 commits July 15, 2020 10:27
Adds support for marshalling out iterables that are not lists or
dictionaries using the CPython engine. In order to achieve this, the
check PyIter.IsIterable was used, along with some extra considerations,
mentioned in the source with comments.
@mmisol mmisol requested a review from mjkkirschner July 15, 2020 21:18
@@ -195,5 +195,34 @@ class myobj:
Assert.AreEqual("Output could not be converted to a .NET value", exc.Message);
}
}

[Test]
public void NonListIterablesCanBeOutput()
Copy link
Member

Choose a reason for hiding this comment

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

does this test hit the condition on line 204?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

so it's currently failing?

Copy link
Collaborator Author

@mmisol mmisol Jul 15, 2020

Choose a reason for hiding this comment

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

No, sorry if I didn't say it right. That test does work and hits that line.

What I meant is that at some point during my development of this I noticed the test failed, which led me to add the block that spans from line 201 to 205.

Copy link
Member

@mjkkirschner mjkkirschner left a comment

Choose a reason for hiding this comment

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

LGTM

@mmisol
Copy link
Collaborator Author

mmisol commented Jul 15, 2020

@mmisol mmisol merged commit 0da94b4 into DynamoDS:master Jul 15, 2020
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