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

rdflib.py3compat deprecated in 5x #36

Closed
aaronhelton opened this issue Jan 23, 2018 · 2 comments
Closed

rdflib.py3compat deprecated in 5x #36

aaronhelton opened this issue Jan 23, 2018 · 2 comments
Assignees
Milestone

Comments

@aaronhelton
Copy link

rdflib-sqlalchemy.termutils is importing from rdflib.py3compat. This still works with RDFLib 4.2.2, but breaks with the 5x (master) branch. Much of the functionality of py3compat is moving to compat instead, but the format_doctest_out decorator is nowhere to be found in master. I don't see an existing issue raised for this, but it is likely to cause problems down the road. I also don't know what the fix is, but will investigate as time permits.

Here's what I am seeing:

Traceback (most recent call last):
   File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
     worker.init_process()
   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
     self.load_wsgi()
   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
     self.wsgi = self.app.wsgi()
   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
     self.callable = self.load()
   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
     return self.load_wsgiapp()
   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
     return util.import_app(self.app_uri)
   File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 352, in import_app
     __import__(module)
   File "/usr/src/app/skjold/wsgi.py", line 16, in <module>
     application = get_wsgi_application()
   File "/usr/local/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
     django.setup(set_prefix=False)
   File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 19, in setup
     configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
   File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
     self._setup(name)
   File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 43, in _setup
     self._wrapped = Settings(settings_module)
   File "/usr/local/lib/python3.6/site-packages/django/conf/__init__.py", line 106, in __init__
     mod = importlib.import_module(self.SETTINGS_MODULE)
   File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
   File "/usr/src/app/skjold/settings.py", line 132, in <module>
     from rdflib_sqlalchemy.store import SQLAlchemy
   File "/usr/local/lib/python3.6/site-packages/rdflib_sqlalchemy/store.py", line 40, in <module>
     from rdflib_sqlalchemy.base import SQLGeneratorMixin
   File "/usr/local/lib/python3.6/site-packages/rdflib_sqlalchemy/base.py", line 7, in <module>
     from rdflib_sqlalchemy.termutils import (
   File "/usr/local/lib/python3.6/site-packages/rdflib_sqlalchemy/termutils.py", line 4, in <module>
     from rdflib.py3compat import format_doctest_out
 ModuleNotFoundError: No module named 'rdflib.py3compat'
@ghost
Copy link

ghost commented Jan 23, 2018

The way forward is shown in commit RDFLib/rdflib@1d01e1e

delete all format_doctest_out decorations and change all instances of %(u)s to plain u. Test by running the doctests :)

If you fancy having a go, feel free. Otherwise, I'll get round to it sooner or later.

@mwatts15 mwatts15 self-assigned this Oct 12, 2019
@mwatts15 mwatts15 added this to the Release 0.4.0 milestone Oct 13, 2019
@mwatts15
Copy link
Collaborator

Closing this now since the code has been removed in the develop branch and doesn't have any direct effect on the user (not yet anyway).

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