Skip to content

Multiple fixes related to Dictionary.Keys bug #1786

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

Merged
merged 5 commits into from
May 20, 2022

Conversation

lostmsu
Copy link
Member

@lostmsu lostmsu commented May 7, 2022

What does this implement/fix? Explain your changes.

This has individual commits for:

  1. bad name generation for nested classes which caused the type of Dictionary.Keys to be confused with the Dictionary itself
  2. quality of life change, that allows cast Generic.IEnumerable(obj), which previously required the generic type argument to be specified. E.g. Generic.IEnumerable[String](obj) was required
  3. collection mixins now cast objects to corresponding interfaces when the interfaces are implemented privately

Does this close any currently open issues?

fixes #1785

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Updated the CHANGELOG

@Martin-Molinero

@filmor
Copy link
Member

filmor commented May 9, 2022

Could you split part 2 out into a separate PR for discussion and add a few tests?

@lostmsu
Copy link
Member Author

lostmsu commented May 9, 2022

Do you have any specific concerns? The reason I made the quality of life change is to use it in IteratorMixin in the very next commit. E.g. it has a minimal test in that it is actually used internally. I don't think GitHubs allows PRs basing off other PRs.

@lostmsu lostmsu added this to the 3.0.0 milestone May 12, 2022
@lostmsu lostmsu merged commit 87d4db9 into pythonnet:master May 20, 2022
@lostmsu lostmsu deleted the bugs/KeyCollection branch May 20, 2022 00:15
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.

Python handling of C# collection
2 participants