Opened 9 years ago

Closed 9 years ago

#26425 closed Cleanup/optimization (wontfix)

SubfieldBase deprecation warning may appear as coming from six

Reported by: Marcel V Owned by: nobody
Component: Utilities Version: 1.9
Severity: Normal Keywords: runserver, SubfieldBase, RemovedInDjango110Warning
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Marcel V)

Using Django 1.9.4, Python 3.4.2, when performing a runserver command, the following warning is displayed in the output:

/Users/coredev/.virtualenvs/newdjango/lib/python3.4/site-packages/django/utils/six.py:808: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.

Change History (7)

comment:1 by Marcel V, 9 years ago

Description: modified (diff)

comment:2 by Tim Graham, 9 years ago

I guess your code probably uses six.with_metaclass() and stacklevel=2 in that warning isn't helping in this case. I don't know if it's worth spending any time trying to improve the situation since it's fairly easy to grep a project directory to find usage of SubfieldBase.

in reply to:  2 comment:3 by Marcel V, 9 years ago

Replying to timgraham:

I guess your code probably uses six.with_metaclass() and stacklevel=2 in that warning isn't helping in this case. I don't know if it's worth spending any time trying to improve the situation since it's fairly easy to grep a project directory to find usage of SubfieldBase.

Ahh, you are correct. After doing a grep search of the site-packages folder, I found an app that uses six.with_metaclass(). I will open a ticket on the suspect app, instead. Thanks for the quick response!

comment:4 by Marcel V, 9 years ago

Resolution: invalid
Status: newclosed

comment:5 by David Szotten, 9 years ago

Resolution: invalid
Status: closednew

seeing this from a few different 3rd party packages. if they are using six.with_metaclass, the otherwise helpful indication of what caused there warning is pretty useless

i guess it's possible to try to detect six, though an easier workaround might be to bump the stacklevel, and err on the side of going too far, which might at least find an import statement indicating where to look

thoughts?

comment:6 by Tim Graham, 9 years ago

Easy pickings: unset
Summary: django/utils/six.py generates a RemovedInDjango110WarningSubfieldBase deprecation warning may appear as coming from six
Type: BugCleanup/optimization

I don't think it's worth spending any time on this issue given grep should be a simple solution.

comment:7 by Tim Graham, 9 years ago

Resolution: wontfix
Status: newclosed

Feel free to reopen if you want to propose a patch.

Note: See TracTickets for help on using tickets.
Back to Top