#25502: Django test suite fails with Python 3.5.0 because of deprecation
warnings
-------------------------+-------------------------------------------------
Reporter: | Owner: nobody
arielpontes |
Type: Bug | Status: new
Component: Testing | Version: 1.8
framework | Keywords: deprecation warning test python
Severity: Normal | 3.5.0
Triage Stage: | Has patch: 0
Unreviewed |
Easy pickings: 0 | UI/UX: 0
-------------------------+-------------------------------------------------
When running the test suite locally with Python 3.5.0, the following tests
fail:
{{{
$ ./tests/runtests.py
...
FAIL: test_old_style_storage (file_storage.tests.FileFieldStorageTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/arielpontes/Projects/python/django/tests/file_storage/tests.py",
line 566, in test_old_style_storage
self.assertEqual(len(warns), 2)
AssertionError: 4 != 2
======================================================================
FAIL: test_migrate_legacy_router (multiple_database.tests.RouterTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/path/to/project/django/tests/multiple_database/tests.py", line
954, in test_migrate_legacy_router
self.assertEqual(recorded, [])
AssertionError: Lists differ: [<warnings.WarningMessage object at
0x10d65ca58>] != []
First list contains 1 additional elements.
First extra element 0:
{message : DeprecationWarning('inspect.getargspec() is deprecated, use
inspect.signature() instead',), category : 'DeprecationWarning', filename
: '/path/to/project/django/django/db/utils.py', lineno : 336, line : None}
- [<warnings.WarningMessage object at 0x10d65ca58>]
+ []
}}}
In inspecting the warnings with ipdb, it turns out these are the
extra/unexpected ones:
`inspect.getargspec() is deprecated, use inspect.signature() instead`
Its seems this is a new warning in Python 3.5. The latest version of
Python that Django supports isn't declared anywhere. The Django 1.8
documentation says it `requires Python 2.7 or above, though we highly
recommend the latest minor release`, but Python 3.5 clearly hasn't been
actually tested. I believe these statements should be more careful,
something along the lines of "it has been tested with Python 2.7 up to
3.4". These errors don't seem to be serious, but god knows what may break
each time a new version of Python is released.
--
Ticket URL: <https://code.djangoproject.com/ticket/25502>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/054.24dfa42e0afa29e333ab850dece63857%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.