#25502 closed Cleanup/optimization (fixed)
Be explicit about supported Python versions in release notes
Reported by: | Ariel Pontes | Owned by: | Tim Graham |
---|---|---|---|
Component: | Documentation | Version: | 1.8 |
Severity: | Normal | Keywords: | deprecation warning test python 3.5.0 |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Change History (7)
comment:1 by , 9 years ago
Component: | Testing framework → Documentation |
---|
comment:2 by , 9 years ago
I think the OP is referring to the “Python Compatibility” section in the release notes. The exact line can be seen in the 1.8 release notes, and 1.7 uses similar wording as well.
comment:3 by , 9 years ago
Oops, sorry about that, it was precipitate of me to claim the supported versions weren't declared anywhere. Thanks for linking to the detailed information. But yes, uranusjr is right, I was referring to the "Python Compatibility" section and I think the wording should be changed. Its misleading and might cause other people to think that's all that is documented.
comment:4 by , 9 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | Django test suite fails with Python 3.5.0 because of deprecation warnings → Be explicit about supported Python versions in release notes |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → Cleanup/optimization |
I already improved the 1.9 and 1.10 release notes, but here's a PR for older versions.
The supported Python versions for each Django release are documented in the FAQ. Django 1.8 only supports Python 2.7 and 3.2 through 3.4. Django 1.9 adds support for 3.5, but also removes any usage of
inspect.getargspec()
. At http://djangoci.com/ you can see that each Django version is continuously tested against the full matrix of supported Python versions and databases, so you don't have to worry that anything suddenly breaks in any of the supported Python versions.Where exactly does it say
Python 2.7 or above
? It should be reworded to accurately reflect the supported versions.