Closed
Bug 1389517
Opened 7 years ago
Closed 7 years ago
[Meta] Clean up Treeherder Python warnings
Categories
(Tree Management :: Treeherder, enhancement, P3)
Tree Management
Treeherder
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`
Assignee | ||
Comment 1•7 years ago
|
||
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.
"""
Assignee | ||
Comment 2•7 years ago
|
||
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.
Assignee | ||
Comment 3•7 years ago
|
||
(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
Assignee | ||
Comment 4•7 years ago
|
||
We can also make pytest warnings fatal using:
[pytest]
filterwarnings = error
(See https://docs.pytest.org/en/latest/warnings.html)
Assignee | ||
Updated•7 years ago
|
Component: Treeherder → Treeherder: Docs & Development
Comment 5•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Attachment #8966794 -
Flags: review?(cdawson)
Updated•7 years ago
|
Attachment #8966794 -
Flags: review?(cdawson) → review+
Comment 6•7 years ago
|
||
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.
Assignee | ||
Updated•7 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
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`
Updated•3 years ago
|
Component: Treeherder: Docs & Development → TreeHerder
You need to log in
before you can comment on or make changes to this bug.
Description
•