Avoid importlib deprecation warnings

10 views
Skip to first unread message

Juanan Pereira

unread,
Sep 19, 2016, 4:17:57 PM9/19/16
to edx-...@googlegroups.com
Hi,

I'm gettings some warnings [Eucalyptus.2, devstack] related to
importlib that are quite annoying:

/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/helpers.py:4:
RemovedInDjango19Warning: django.utils.importlib will be removed in
Django 1.9.

In that file, I've tried to replace :

from django.utils.importlib import import_module

with:

from importlib import import_module

and it seems to work, avoiding the warning messages.

Is it such a simple solution a valid one or are there any other
pitfalls involved?

Thanks.

--
Greetings,

Juanan Pereira

gs...@edx.org

unread,
Sep 20, 2016, 9:45:58 AM9/20/16
to General Open edX discussion
Hi Juanan,

`django-require` is a third party package so you don't want to make changes that way. Since it's just a future deprecation warning, you can safely ignore it. When we upgrade the version of Django we're using, we'll upgrade `django-require` accordingly.

-- 
George

Juanan Pereira

unread,
Sep 20, 2016, 3:00:07 PM9/20/16
to edx-...@googlegroups.com
Hi George,

On Tue, Sep 20, 2016 at 3:45 PM, <gs...@edx.org> wrote:
> `django-require` is a third party package so you don't want to make changes
> that way. Since it's just a future deprecation warning, you can safely
> ignore it. When we upgrade the version of Django we're using, we'll upgrade
> `django-require` accordingly.

Ah, I got it.

Thanks for the explanation.

--
Juanan Pereira
Reply all
Reply to author
Forward
0 new messages