Skip to content

Commit

Permalink
#86 revert rdflib to 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Emrys committed Nov 25, 2021
1 parent 4947830 commit 72e5fe1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: false
language: python
python:
- 3.7
- 3.6
- 3.8
- 3.9
install:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requests==2.26.0
skosprovider==1.0.0
#-e git+https://github.com/koenedaele/skosprovider.git@DEV_0.7.0#egg=skosprovider
rdflib==6.0.2
rdflib==5.0.0
5 changes: 2 additions & 3 deletions skosprovider_getty/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _create_from_subject_typelist(graph, subject, typelist):
list = []
note_uris = []
for p in typelist:
term = SKOS._NS.term(p)
term = SKOS.term(p)
list.extend(_create_from_subject_predicate(graph, subject, term, note_uris))
return list

Expand Down Expand Up @@ -300,8 +300,7 @@ def uri_to_graph(uri, **kwargs):
res = do_get_request(uri, s)
if res.status_code == 404:
return False
content_type = res.headers['Content-Type'].split(';')[0]
graph.parse(data=res.content, format=content_type)
graph.parse(data=res.content)
return graph


Expand Down
3 changes: 1 addition & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import pytest
import rdflib
from rdflib.namespace import SKOS
from rdflib.plugin import PluginException
from skosprovider.exceptions import ProviderUnavailableException

from skosprovider_getty.utils import GVP
Expand All @@ -19,7 +18,7 @@ def test_uri_to_graph(self):

def test_uri_to_graph2(self):
uri = 'http://vocab.getty.edu/aat/300007466'
with pytest.raises(PluginException):
with pytest.raises(TypeError):
uri_to_graph(uri)

def test_uri_to_graph_not_found(self):
Expand Down

0 comments on commit 72e5fe1

Please sign in to comment.