Closed Bug 1389517 Opened 7 years ago Closed 7 years ago

[Meta] Clean up Treeherder Python warnings

Categories

(Tree Management :: Treeherder, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(2 files)

There are various warnings being output during pytest runs right now, as well as further ones only visible when `PYTHONWARNINGS` is set. We should clean these up. eg: `PYTHONWARNINGS=once pytest`
A couple of the warnings are from graphene_django, for which I've filed: https://github.com/graphql-python/graphene-django/issues/242 for: """ .../site-packages/graphene_django/utils.py:61: RemovedInDjango20Warning: Usage of field.rel has been deprecated. Use field.remote_field instead. .../site-packages/graphene_django/utils.py:63: RemovedInDjango20Warning: Usage of ForeignObjectRel.to attribute has been deprecated. Use the model attribute instead. """
Depends on: 1389536
Depends on: 1389538
Depends on: 1389548
All the remaining warnings are on our side, for which I've filed dep bugs. Once everything is fixed we should consider using `PYTHONWARNINGS=once` on Travis (or pass `-W PYTHONWARNINGS` to pytest), to make any future warnings more obvious.
(In reply to Ed Morley [:emorley] from comment #1) > A couple of the warnings are from graphene_django, for which I've filed: > > https://github.com/graphql-python/graphene-django/issues/242 for: I've opened a PR to fix this: https://github.com/graphql-python/graphene-django/pull/245
We can also make pytest warnings fatal using: [pytest] filterwarnings = error (See https://docs.pytest.org/en/latest/warnings.html)
Component: Treeherder → Treeherder: Docs & Development
Depends on: 1400222
Depends on: 1453189
Attachment #8966794 - Flags: review?(cdawson)
Attachment #8966794 - Flags: review?(cdawson) → review+
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/36f0a71e037cae883d2f602a07c63c3208fff518 Bug 1389517 - Make Python warnings fatal during pytest runs This makes most warning types (including the normally hidden `DeprecatonWarning`s) fatal during pytest runs, to help prevent regressions now that most of them have been fixed. See: https://docs.pytest.org/en/latest/warnings.html https://docs.python.org/2.7/library/warnings.html#warning-categories https://github.com/mozilla/treeherder/commit/aaaf1a51aa8ee6be262bd0ccfcf9f7d6dd8b081a Bug 1389517 - Enable DeprecationWarnings when running manage.py To help surface deprecation warnings more visible when running Django commands locally (rather than just when running pytest). These will not cause the command to fail.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/2800a878b7411d23e0cfefa119079f4bc7fbe898 Bug 1389517 - Remove usages of deprecated pypom .selenium property (#3441) Fixes: `pypom/view.py:21: DeprecationWarning: use driver instead`
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: