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

Improve the dispatch algorithm by avoiding unnecessary ambiguities #151

Merged
merged 14 commits into from
Jun 2, 2024

Conversation

wesselb
Copy link
Member

@wesselb wesselb commented May 24, 2024

@PhilipVinc, I've taken some time to go over #119. I've attempted to implement a very similar approach in a way that makes it very clear where precisely we deviate from the subset relationship and why that is justified.

Would you be able to check if this works for your use case? If it does, I'll add some more extensive tests based on the examples from the other PR.

@coveralls
Copy link

coveralls commented May 24, 2024

Pull Request Test Coverage Report for Build 9339827200

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 21 of 21 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 9223100708: 0.0%
Covered Lines: 1227
Relevant Lines: 1227

💛 - Coveralls

@wesselb wesselb changed the title Break ties for equal signatures Improve the dispatch algorithm by avoiding unnecessary ambiguities May 24, 2024
Copy link
Collaborator

@PhilipVinc PhilipVinc left a comment

Choose a reason for hiding this comment

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

Apart from those extra tests, this PR fixes the issues I had with plum and would allow us to stop vendoring it, so I'm supporting it in full.

Moreover, I think this is equivalent to my past PR (albeit much more elegant) so again, I think that's the right approach.

Thanks!

tests/test_signature.py Show resolved Hide resolved
tests/test_signature.py Show resolved Hide resolved
@wesselb wesselb mentioned this pull request Jun 2, 2024
@wesselb
Copy link
Member Author

wesselb commented Jun 2, 2024

@PhilipVinc Perfect! :) I'll then finalise this PR by adding the missing tests and merge it.

wesselb and others added 2 commits June 2, 2024 18:16
Co-authored-by: Filippo Vicentini <filippovicentini@gmail.com>
Co-authored-by: Filippo Vicentini <filippovicentini@gmail.com>
@PhilipVinc PhilipVinc mentioned this pull request Jun 2, 2024
@PhilipVinc
Copy link
Collaborator

@wesselb can I merge? seems all is good

@wesselb
Copy link
Member Author

wesselb commented Jun 2, 2024

@PhilipVinc I'm making some final tweaks. If it's ok, I'll merge this in the next ~hour.

@wesselb
Copy link
Member Author

wesselb commented Jun 2, 2024

@PhilipVinc Actually, that was faster than expected. I think it looks good. I've added a comment what precisely need to be fixed to fully resolve #117. I think it's feasible to fix, but beyond the scope of this PR. Happy to merge this now?

@PhilipVinc
Copy link
Collaborator

happy to!

@wesselb wesselb merged commit a5a1cd4 into master Jun 2, 2024
5 of 6 checks passed
@wesselb wesselb deleted the wbruinsma/break-ties branch June 2, 2024 16:54
@wesselb
Copy link
Member Author

wesselb commented Jun 2, 2024

Hurray! I'm pretty happy this is finally partially fixed. :)

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.

3 participants