Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#25846 closed Uncategorized (needsinfo)

RemovedInDjango110Warning coming from SubfieldBase

Reported by: Yuval Adam Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This warning pops up on runserver/validate/migrate:

~/.virtualenvs/proj/lib/python3.4/site-packages/django/db/models/fields/subclassing.py:22: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.

Change History (7)

comment:1 by Claude Paroz, 8 years ago

Resolution: needsinfo
Status: newclosed

And?

comment:2 by Aymeric Augustin, 8 years ago

To expand a bit on Claude's technically correct answer -- this warning is likely caused by your code or a third-party library you're using. Running under python -Werror will tell you where this warning originates.

comment:3 by Yuval Adam, 8 years ago

I'm not any closer to understanding which third party package is throwing this error:

$ python -Werror manage.py runserver
Failed to import the site module
Traceback (most recent call last):
  File "~/.virtualenvs/proj/bin/../lib/python3.4/site.py", line 703, in <module>
    main()
  File "~/.virtualenvs/proj/bin/../lib/python3.4/site.py", line 683, in main
    paths_in_sys = addsitepackages(paths_in_sys)
  File "~/.virtualenvs/proj/bin/../lib/python3.4/site.py", line 282, in addsitepackages
    addsitedir(sitedir, known_paths)
  File "~/.virtualenvs/proj/bin/../lib/python3.4/site.py", line 204, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "~/.virtualenvs/proj/bin/../lib/python3.4/site.py", line 165, in addpackage
    f = open(fullname, "rU")
DeprecationWarning: 'U' mode is deprecated

comment:4 by Tim Graham, 8 years ago

It's not a Django issue, please see https://github.com/pypa/virtualenv/issues/555.

Please use the resources linked from TicketClosingReasons/UseSupportChannels instead of this ticket tracker to get help going forward. Thanks!

comment:5 by Tim Graham <timograham@…>, 8 years ago

In 64200c14:

[1.9.x] Refs #25846 -- Added stacklevel to SubfieldBase warning.

comment:6 by Tim Graham <timograham@…>, 8 years ago

In e73406d1:

[1.8.x] Refs #25846 -- Added stacklevel to SubfieldBase warning.

Backport of 64200c14e0072ba0ffef86da46b2ea82fd1e019a from stable/1.9.x

comment:7 by Yuval Adam, 8 years ago

Thanks for the fix! Sorry I wasn't any clearer when opening the ticket, but the stacklevel fix makes lots of sense and can hopefully assist in debugging in future scenarios.

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