Closed Bug 1453850 Opened 7 years ago Closed 7 years ago

Enable Python 2's `-3` mode on Travis

Categories

(Tree Management :: Treeherder, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file)

Passing the `-3` option to Python 2 switches on DeprecationWarnings about Python 3 incompatibilities: https://docs.python.org/2/using/cmdline.html#cmdoption-3 By using `-3` mode on Travis, it will help prevent regressions in the Python 3 fixes that have already landed. This mode already helped find one real issue that affects us even under Python 2 (bug 1453837).
Attachment #8967603 - Flags: review?(cdawson)
Attachment #8967603 - Flags: review?(cdawson) → review+
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/023d31885a8c9d421450713a871e6576c85794a8 Bug 1453850 - Enable Python 2's `-3` mode on Travis (#3444) This enables `DeprecationWarnings` for things that Python 2 knows are not compatible with Python 3. The `error` entry in the pytest `filterwarnings` setting ensures these will be surfaced as Exceptions and so result in test failures. See: https://docs.python.org/2/using/cmdline.html#cmdoption-3 The removal of `sorted()` from `test_bug_job_map_api.py` is to fix: `DeprecationWarning: dict inequality comparisons not supported in 3.x`
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: Treeherder: Docs & Development → TreeHerder
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: