Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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 Marten Kenbeek, 9 years ago

Component: Testing frameworkDocumentation

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.

comment:2 by Tzu-ping Chung, 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 Ariel Pontes, 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 Tim Graham, 9 years ago

Has patch: set
Owner: changed from nobody to Tim Graham
Status: newassigned
Summary: Django test suite fails with Python 3.5.0 because of deprecation warningsBe explicit about supported Python versions in release notes
Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

I already improved the 1.9 and 1.10 release notes, but here's a PR for older versions.

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

Resolution: fixed
Status: assignedclosed

In b215a3a:

Fixed #25502 -- Added supported Python versions in 1.7, 1.8 release notes.

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

In bf428888:

[1.8.x] Fixed #25502 -- Added supported Python versions in 1.7, 1.8 release notes.

Backport of b215a3ab63d1c34746855594656e988561484fe3 from master

comment:7 by Tim Graham <timograham@…>, 9 years ago

In 9f31439:

[1.9.x] Fixed #25502 -- Added supported Python versions in 1.7, 1.8 release notes.

Backport of b215a3ab63d1c34746855594656e988561484fe3 from master

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