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

fix: add __hash__ and __eq__ back to rdflib.paths.Path #2292

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

aucampia
Copy link
Member

Summary of changes

These methods were removed when @total_ordering was added, but
@total_ordering does not add them, so removing them essentially
removes functionality.

This change adds the methods back and adds tests to ensure they work
correctly.

All path related tests are also moved into one file.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Added tests for any changes that have a runtime impact.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@coveralls
Copy link

coveralls commented Mar 19, 2023

Coverage Status

Coverage: 90.784% (+0.002%) from 90.782% when pulling d126c55 on aucampia:iwana-20230319T1735-fix_path into 7a05c15 on RDFLib:main.

These methods were removed when `@total_ordering` was added, but
`@total_ordering` does not add them, so removing them essentially
removes functionality.

This change adds the methods back and adds tests to ensure they work
correctly.

All path related tests are also moved into one file.

- Closes <RDFLib#2281>.
- Closes <RDFLib#2242>.
@aucampia aucampia force-pushed the iwana-20230319T1735-fix_path branch from 35758ad to d126c55 Compare March 19, 2023 17:11
@aucampia aucampia added review wanted This indicates that the PR is ready for review ready to merge The PR will be merged soon if no further feedback is provided. labels Mar 19, 2023
@aucampia
Copy link
Member Author

Planning to merge this by 2023-03-21.

@aucampia aucampia marked this pull request as ready for review March 19, 2023 17:20
@aucampia aucampia requested a review from a team March 19, 2023 17:20
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@aucampia aucampia merged commit fe1a8f8 into RDFLib:main Mar 21, 2023
@aucampia aucampia deleted the iwana-20230319T1735-fix_path branch April 9, 2023 15:04
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR will be merged soon if no further feedback is provided. review wanted This indicates that the PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equality of Path objects cannot be checked Path objects do not support membership testing
2 participants