-
Notifications
You must be signed in to change notification settings - Fork 559
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
Addition of override
argument to rdflib.store.Store.bind
breaks compatibility
#1880
Comments
override
argument to rdflib.store.Store.bind
breaks compatibility
So the way I see it, the addition of "override" fixed a bug, but to fix the bug we need the interface of bind on stores to accept the argument. I think the most reasonable solution here is to call store bind via this adaptor method: rdflib/rdflib/namespace/__init__.py Lines 621 to 626 in 9829241
This way, if the underlying store does not support the override argument we just call Store.bind without it, and then the bug will still be present. I'm still testing this and will try refine it a bit so that it does not catch unrelated errors and I will improve the log message. CC: @RDFLib/core-reviewers |
If `Store.bind` raises a `TypeError`, and the string conversion of this TypeError contains `override`, then log a warning and call `Store.bind` without an override. This is done so that stores that do not accept `override` on `Store.bind` still work, but at the cost of still having the bug that was fixed by introducing the `override` parameter. Also added a private flag which can be used to disable the fix entirely and never use `override` when calling `Store.bind`. - Fixes #1880
See:
Memory
,SimpleMemory
andBerkelyDB
stores. #1843 (comment)The text was updated successfully, but these errors were encountered: