Skip to content

Fix for Issue #543 (Namespace unbind required) including trie and other modification #1094

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

abhishekvickyvyas
Copy link

@abhishekvickyvyas abhishekvickyvyas commented May 29, 2020

For Issue #543 ,We added a unbind function which can be called in same way in which we call bind function. We pass the prefix that need to be unbind. In this PR we also take care of Trie and other cases in both rdflib/namespace.py and rdflib/plugins/memory.py .

The example can be given as:-

from rdflib import Graph, Namespace
g = Graph()
g.namespace_manager.bind('abc', Namespace('http://abc.com/xyz/0.1'))
print('--- namespaces before unbinding ----')
for ns in g.namespaces():
print('%s:%s' % (ns))
print
g.namespace_manager.unbind('abc')
print("\n\n")
print('--- namespaces after unbinding ----')
for ns in g.namespaces():
print('%s:%s' % (ns))
print

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 75.727% when pulling 616819d on SJPVYAS:tri_modification into 037ea51 on RDFLib:master.

@nicholascar
Copy link
Member

@abhishekvickyvyas would you be willing to update this PR since the in-memory graph has changes? Also, can you please provide some tests? Can't really accept a PR without tests. Thanks.

@ghost ghost mentioned this pull request Mar 31, 2022
@ghost ghost mentioned this pull request Jun 5, 2022
8 tasks
@ghost ghost changed the title Fix for Issue #543 including trie and other modification Fix for Issue #543 (Namespace unbind required) including trie and other modification Jun 8, 2022
@ghost ghost added the 7.0 Changes planned for version 7 label Jun 8, 2022
@ghost
Copy link

ghost commented Jun 8, 2022

Subequently rebased and extended, close when #1985 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.0 Changes planned for version 7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants