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

Support RDFLib 5.0.0 #1298

Open
Panaetius opened this issue May 28, 2020 · 6 comments
Open

Support RDFLib 5.0.0 #1298

Panaetius opened this issue May 28, 2020 · 6 comments

Comments

@Panaetius
Copy link
Contributor

RDFLib released version 5.0.0 on 4th April, which many bugfixes detailed here https://github.com/RDFLib/rdflib/blob/master/docs/upgrade4to5.rst

Are there any plans to make cwltool work with RDFLib 5.0.0?

@mr-c
Copy link
Member

mr-c commented May 28, 2020

Hello @Panaetius . I'm open to it ; do you want to send a PR to see if anything breaks?

@mr-c
Copy link
Member

mr-c commented May 28, 2020

RDFLib v5 isn't in Debian yet, so I won't make it mandatory until then

https://packages.debian.org/sid/python-rdflib

@Panaetius
Copy link
Contributor Author

I tried to look into it. schema-salad would have to be updated as well, so I looked at that first at https://github.com/Panaetius/schema_salad/tree/rdflib-5.0.0

There's an issue with rdflib.namespace.split_uri() now allowing : in names, so I added a small workaround.

The next issue is that rdflib.py3compat was removed in RDFLib/rdflib#519 which looks like a bigger change.

Without being familiar with rdflib, schema-salad or cwltool source code, this looks like it'd be a rather big effort to fix unfortunately

@mr-c
Copy link
Member

mr-c commented May 29, 2020

Thank you @Panaetius for starting this, it will be needed at some point.

@mr-c
Copy link
Member

mr-c commented May 29, 2020

We are Python3.5+ only now, so the removal of py3compat shouldn't matter, I don't think.

@Panaetius
Copy link
Contributor Author

Actually, py3compat is not used in cwltool/schema_salad but the error was from rdflib-jsonld.

The requirements of rdflib-jsond say that it works with any rdflib > 4.2, but rdflib-jsonld 0.4.0 does not work with rdflib 5.0.0 due to the p3compat. See RDFLib/rdflib-jsonld#78
So if someone upgrades rdflib, pip would see the requirement for rdflib-jsonld as fullfilled, even though the versions are incompatible.

All the tests pass with 5.0.0 & rdflib-jsonld 0.5.0 for python 3.8 for both cwltool and schema_salad. They fail for python 3.5 but I think that's just some issue with tox caching versions on my end.

So everything seems to work with 5.0.0 and the minor fix, there's just the potential for a broken upgrade path where rdflib is upgraded but rdflib-jsonld is not.

On a side note, my bugfix for schema_salad just replicates the old functionality of split_uri() in case the new functionality didn't work. But it might be better to not rely on split_uri() at all and implement a specific function for what schema_salad wants to accomplish.

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

No branches or pull requests

2 participants