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

Path objects do not support membership testing #2242

Closed
kouralex opened this issue Mar 2, 2023 · 1 comment · Fixed by #2292
Closed

Path objects do not support membership testing #2242

kouralex opened this issue Mar 2, 2023 · 1 comment · Fixed by #2292
Assignees
Labels
bug Something isn't working core Relates to core functionality of RDFLib, i.e. `rdflib.{graph,store,term}` regression Something stopped working

Comments

@kouralex
Copy link

kouralex commented Mar 2, 2023

I recently found out that whilst URIRefs support expressions such as uriref in list/dict the same does not apply to Path objects, effectively making one unable to use Paths as dict keys, for instance. One could, of course, apply a .n3() string transformation whilst setting the key value in order to achieve such feature, but to me it would seem a more appropriate to be able to check for membership directly via Path objects.

@aucampia aucampia added enhancement New feature or request core Relates to core functionality of RDFLib, i.e. `rdflib.{graph,store,term}` and removed enhancement New feature or request labels Mar 19, 2023
@aucampia
Copy link
Member

As @alhyss said, this seems related to #2281. I will look at it when I have time and hopefully release it in 6.3.2.

@aucampia aucampia added the bug Something isn't working label Mar 19, 2023
aucampia added a commit to aucampia/rdflib that referenced this issue Mar 19, 2023
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.

I also moved all path related tests into one file.

- Closes <RDFLib#2281>.
- Closes <RDFLib#2242>.
aucampia added a commit to aucampia/rdflib that referenced this issue Mar 19, 2023
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 self-assigned this Mar 19, 2023
@aucampia aucampia added the regression Something stopped working label Mar 19, 2023
aucampia added a commit to aucampia/rdflib that referenced this issue Mar 19, 2023
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 added a commit that referenced this issue Mar 21, 2023
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 <#2281>.
- Closes <#2242>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Relates to core functionality of RDFLib, i.e. `rdflib.{graph,store,term}` regression Something stopped working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants