-
Notifications
You must be signed in to change notification settings - Fork 71
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
py3compat module is removed in rdflib 5.0.0rc1 #78
Comments
The rdflib.py3compat dependency in rdflib-jsonld has been removed from rdflib-jsonld master so a new release from master will fix this. |
oh, did I just run into this? https://twitter.com/danbri/status/1247263674080903169 maybe I should install from github? |
I've put half an hour into this and totally failed so far. I have no legacy commitments, just want to get rdflib working in a fresh Python 3 (https://colab.research.google.com/) environment. I am super-happy to see these libraries getting attention again and don't wish to seem ungrateful. Looking forward to sample code that shows off everything you've been doing for those of us who haven't managed to follow the details... |
Hi @danbri yes, this is the issue you hit! If you just install rdflib-jsonld from master, rather than the current 0.4.0 release, everything will work. We should have a new rdflib-jsonld release out in days to fix this permanently. I assume you’re running the 5.0.0rc1 Release Candidate for the main rdflib? Because the other option would be to downgrade that to rdflib 4.2.2 (the now 3+ year old stable release!) and that would also fix things for you. Full rdflib 5.0.0 should be out in 10 or so days, assuming we get this next rdflib-jsonld release out to fix this issue first! |
Here is an attempt in Colab. It's from @bquinn but my experiments were essentially the same: https://colab.research.google.com/drive/1s39p5M5jUBHDf0MNT4xHhjylImm3JrlQ#scrollTo=0FC4rxAwTkcW He reported that it works some of the time, when you use "run all" rather than run step by step. I partially replicated that experience but am still getting a "no plugin" error at this moment. This is with a python 3 runtime, and I didn't have any success with python 2. Could this be a Colab quirk? |
I just released rdflib-jsonld 0.5.0 from current master. I hope that helps sorting this out. |
@danbri @bquinn: I'm not familiar with Colab but I've tested each of the code chunks you have in there with this rdflib-jsonld 0.5.0 release and these are my results:
Imports work fine.
I can't run this code as I see no data at https://data.hikob.com/osc/parking, hence I get the general urllib exception
Runs just fine. Can you please confirm/reject these results and, if confirmed, I will close this Issue since the rdflib-jsonld 0.5.0 release seems to solve it. |
Running (rdflib-5.0.0, rdflib-jsonld-0.6.0.dev0, Python 3.6.9) that second block in CoLab I get:
Details follow. Library installation was using this:
... which I assume ought to install the latest/greatest version. Results:
Then we try this:
Result:
Version:
Output:
|
While I would suggest that you switch to pypi, the above sequence works for me. It looks like you are using Jupyter -- any chance that you may need to restart it to bet the import to "take"? |
I changed the imports to use pypi instead of github and re-started the engine and the above example worked. |
Confirming I don't get the issue using the PyPI releases (rdfllib 5.0.0, rdflib-jsonld 0.5.0). I replicate the issue with rdfllib installed but not rdflib-jsonld. Hopefully we can bypass all of this by incorporating rdflib-jsonld into rdflib soon... |
Thanks for looking into this. I've just tried again (using the same Colaboratory notebook that @danbri linked above) importing the pypi versions now that they have been released:
If I run the Colaboratory commands "factory reset runtime" and then "run all", I get the same as @danbri:
BUT, if I then run "restart runtime" (as opposed to "factory reset"), and then "run all" again, it works. So @hsolbrig's comment about restarting Jupyter to get the import to "take" is on the money. But why should that be the case? Is it a bug in Jupyter or Colaboratory perhaps? |
I've reproduced what @bquinn reports. It needed a reset runtime and then a restart runtime to get rdflib to work. However, after the "restart runtime", you don't need to run the installation commands again, it is enough to do this:
This looks relevant: |
From the stackoverflow item above, I've found that
does the job reliably (if horribly), and that a restart does seem to be needed for other Python modules too. We are now rather beyond the scope of the original issue, but this might be worth remembering if others have Colab / Jupyter problems. |
Finally after more than 3 years of waiting the rdflib 5.0.0 release is nearly upon us!
The 5.0.0rc1 release was pushed out today, and while we've tried to avoid as much breaking as possible, there is inevitably a lot of churn between v4.2.2 in Jan 2017, and today.
We've noticed when importing rdflib-jsonld in RDFLib 5.0.0rc1, we get:
The py3compat module was removed from rdflib master years ago, but the change hasn't made its way into a release until today.
Is there a way we can make rdflib-jsonld compatible with RDFLib 5.0.0 during the RC period?
The text was updated successfully, but these errors were encountered: