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

Renamed sql.py import to prevent RemovedInDjango19Warning #124

Closed
wants to merge 1 commit into from
Closed

Renamed sql.py import to prevent RemovedInDjango19Warning #124

wants to merge 1 commit into from

Conversation

justinsg
Copy link

When using Django 1.8.6 and django-devserver 0.8.0, I get three RemovedInDjango19Warning messages when running ./manage.py runserver.

/home/justin/.virtualenvs/myproject/local/lib/python2.7/site-packages/devserver/modules/sql.py:15: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
  from django.db.backends import util

/home/justin/.virtualenvs/myproject/local/lib/python2.7/site-packages/devserver/modules/sql.py:15: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
  from django.db.backends import util

/home/justin/.virtualenvs/myproject/local/lib/python2.7/site-packages/devserver/modules/sql.py:15: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
  from django.db.backends import util

Performing system checks...

System check identified no issues (0 silenced).
November 18, 2015 - 13:12:31
Django version 1.8.6, using settings 'myproject.local_settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

I have renamed the imports as suggested by the exception messages and this stops the warnings from occurring. Backward compatibility is provided by catching the ImportError and importing the older module under the newer name.

@justinsg
Copy link
Author

Fixed in 4c5864a

@justinsg justinsg closed this Jul 24, 2016
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

Successfully merging this pull request may close these issues.

None yet

1 participant