Граф коммитов

7896 Коммитов

Автор SHA1 Сообщение Дата
Ed Morley 42acc29e6c Bug 1452420 - Add `from __future__ import division`
Adds the future import anywhere we use division, for consistency
between Python 2 and 3. Some instances of division required casting
to int, since the new division always returns float, even when
dividing by in int.

See:
https://eev.ee/blog/2016/07/31/python-faq-how-do-i-port-to-python-3/#division-always-produces-a-float

Fixes pylint `old-division`.
2018-04-10 19:22:28 +01:00
Ed Morley 4281bf2a32 Bug 1452420 - Make ABCMeta __metaclass__ Python 3 compatible
See:
https://pythonhosted.org/six/#six.add_metaclass
https://stackoverflow.com/a/35673504

Fixes pylint `metaclass-assignment`.
2018-04-10 19:22:28 +01:00
Ed Morley 79ce5dfd1a Bug 1452420 - Stop using Exception.message
Since it doesn't exist in Python 3.

Fixes pylint `exception-message-attribute`.
2018-04-10 19:22:28 +01:00
Ed Morley 163068c083 Bug 1452420 - Replace types.StringTypes with six.string_types
Since the former doesn't exist in Python 3. See:
https://docs.python.org/2/library/types.html#types.StringTypes
https://pythonhosted.org/six/#six.string_types

Fixes pylint `deprecated-types-field`.
2018-04-10 19:22:28 +01:00
Ed Morley 02d3c625c7 Bug 1452420 - Cast Python 3 map/filter iterators where necessary
Python 3's `map()`, `filter()` and others now return iterators rather
than list/..., so must be cast back to a `list()` if used in contexts
where an iterator is not supported.
2018-04-10 19:22:28 +01:00
Ed Morley 5d6cb2371c Bug 1452420 - Make .iter{items,keys}() usages Python 3 compatible
Fixes pylint `dict-iter-method` (and many more, since pylint missed
most of them, sigh).
2018-04-10 19:22:28 +01:00
Dave Hunt fd1d2e5661 Migrate test_pin_jobs to Travis suite 2018-04-10 19:21:54 +01:00
Ed Morley d789f62bf8
Bug 1452904 - Rebalance the Travis test chunks (#3424)
This merges the three separate non-selenium Python test jobs into
one, reducing the overall job count from 7 to 5. This helps avoid
hitting Travis concurrency limits, that delay starting the selenium
job (which is the long pole for the end to end time).
2018-04-10 19:09:05 +01:00
Ed Morley 66f65de010
Bug 1452304 - Remove publish_result_set_to_pulse command (#3417)
Since it's been broken since 2015, due to the non-existent
`publish_to_pulse` import.
2018-04-10 16:44:12 +01:00
Ed Morley db3073277e Bug 1452252 - Remove the remove_perf_signatures command (#3422)
Since it's broken and no longer required.
2018-04-10 09:33:53 -04:00
pyup.io bot 972a69e95f Update pytz from 2018.3 to 2018.4 (#3423) 2018-04-10 12:44:16 +01:00
Eli Perelman 17df068b46 Update links to Taskcluster Tools interactions (#3421) 2018-04-09 19:32:22 +01:00
pyup.io bot 856e96cf3f Update pycryptodome from 3.5.1 to 3.6.0 (#3420) 2018-04-09 11:22:31 +01:00
Ed Morley addd73c863
Bug 1452213 - Correctly set RunnableJobs group (#3416)
Previously all created/updated `RunnableJobs` entries were using the
`job_group` default of `2`, rather than the actual job group ID.

Not bothering to add a test since `RunnableJobs` will be going away
once buildbot supported is removed.
2018-04-07 00:01:52 +01:00
Ed Morley 2f3657ceed
Bug 1452220 - Fix import_perf_data exception string formatting (#3415)
Since `.format()` doesn't support `%s`. Found by the eslint
`too-many-format-args` rule.
2018-04-07 00:01:25 +01:00
Sarah Clements e64be6b0fa Bug 1448768 - fix graph data (#3408)
* Change data calculation and temp label fix to support decimals
* Add link to metric-graphics decimal bug
2018-04-06 15:20:05 -07:00
Dave Hunt 7beb3cacc3 Migrate test_filter_jobs to Travis suite 2018-04-06 21:49:21 +01:00
Dave Hunt f774b7d6d0 Improve the fixtures for creating test jobs 2018-04-06 21:49:21 +01:00
Dave Hunt 38d0557a0b Migrate test_filter_jobs_by_author to Travis suite 2018-04-06 19:52:17 +01:00
pyup.io bot d1094db37a Update djangorestframework from 3.8.1 to 3.8.2 (#3411) 2018-04-06 19:42:29 +01:00
SimonFje 501179c450 Remove lodash forEach usage for objects (#3406) 2018-04-06 09:10:41 -07:00
Dave Hunt 572c75d8ec Migrate test_expanding_group_count to Travis suite 2018-04-06 15:59:51 +01:00
Ed Morley 1a2db1664e Bug 1451774 - Test Django migrations under Python 3 on Travis
The pytest run would normally ensure that the migrations succeed and
that none are missing. However the unit tests currently fail due to
bug 1428362, so this provides equivalent coverage in the meantime.
2018-04-06 15:15:34 +01:00
Ed Morley f345fe5b10 Bug 1451774 - Cast FailureLine choices to a list
Since under Python 3 `zip()` returns an iterable rather than a list,
which causes Django to ignore the value passed to `choices`, and so
results in `makemigrations` creating a new migration removing the
choices present in the existing migration.
2018-04-06 15:15:34 +01:00
Ed Morley a3e1b6767b Bug 1451774 - Remove bytestring attributes from existing migrations
Now that the models / `settings.py` contain the `unicode_literal`
import, we either need to generate a new migration to bring the
migrations in sync with the model, or else manually edit the existing
migrations.

We have to do the latter for the `replaces` property instances due to:
https://code.djangoproject.com/ticket/29290

...so for consistency (and to save creating a pointless migration),
we do so for the other instances too.
2018-04-06 15:15:34 +01:00
Ed Morley 7a3b33860b Bug 1451774 - Add more unicode_literals __future__ imports
To prevent new migrations generated by `makemigrations` or
`squashmigrations` from containing spurious bytestring attributes:
https://docs.djangoproject.com/en/1.11/topics/migrations/#supporting-python-2-and-3

The `settings.py` addition is required since the app name used in
the `replaces` property of squashed migrations comes `INSTALLED_APPS`,
since we're not using the newer approach of an `AppConfig` defined
in `apps.py`.
2018-04-06 15:15:34 +01:00
pyup.io bot 0ea4717230 Update sphinx-rtd-theme from 0.2.4 to 0.3.0 (#3409) 2018-04-05 23:47:11 +01:00
Ed Morley e694ba0533
Bug 1451457 - Removed unused partials (#3398)
The `login.html` partial is a leftover from the switch to Auth0 in
bug 1395356, and `errorActions.html` appears to have never been used
since it landed in 8e56de8 (bug 1321798).
2018-04-05 18:32:25 +01:00
Renovate Bot 5d0fe96959 Update dependency popper.js to v1.14.3 2018-04-05 16:32:54 +01:00
pyup.io bot ba3b7edeee Update pytest-html from 1.16.1 to 1.17.0 (#3403) 2018-04-05 15:22:11 +01:00
Ed Morley dd4c0dbec4 Bug 1451518 - Run Django check under Python 3 on Travis
This increases coverage over just running flake8, and provides a
stepping-stone prior to working on making the pytest tests pass too.
2018-04-05 12:07:20 +01:00
Ed Morley b08c03132a Bug 1451518 - Fix SyntaxError in etl/text.py under Python 3
Even though the raw unicode (`ur`) string is in the Python 2 branch
of the conditional, the whole file was parsed, causing a `SyntaxError`
when running Django check under Python 3:

```
...
  File "/home/vagrant/treeherder/treeherder/etl/text.py", line 13
    filter_re = re.compile(ur"([\U00010000-\U0010FFFF])", re.U)  # noqa: E999
                                                       ^
SyntaxError: invalid syntax
```

The `ur` syntax isn't supported under Python 3 (since it was removed
by https://bugs.python.org/issue15096), however we can use the
workaround suggested here:
https://stackoverflow.com/a/33027349
2018-04-05 12:07:20 +01:00
Ed Morley 2e8f09655f Bug 1451518 - Replace HTMLParser with six.moves.html_parser
https://pythonhosted.org/six/#module-six.moves
2018-04-05 12:07:20 +01:00
Ed Morley ee44d0086f Bug 1451518 - Replace urlparse with six.moves.urlib.parse
https://pythonhosted.org/six/#module-six.moves
https://pythonhosted.org/six/#module-six.moves.urllib.parse
2018-04-05 12:07:20 +01:00
Ed Morley 6dd2793602 Bug 1451518 - Tweak six.moves.input usage
* Switches from the deprecated Django `six` shim to importing directly.
* No longer imports `input` into the global namespace, to stop `futurize`
  from falsely thinking it needs converting to use `future.builtins`.
2018-04-05 12:07:20 +01:00
Ed Morley f67e755603 Bug 1451518 - Make all classes subclass object
Fixed via:
`futurize -w -n -f newstyle .`

...and then the unnecessary `from builtins import object` removed,
since none of our classes define `next`:
https://stackoverflow.com/q/36517648
2018-04-05 12:07:20 +01:00
Ed Morley 46ced2c031 Bug 1451518 - Use more idiomatic type comparisons
Fixed via:
`futurize -w -n -f idioms .`

See:
https://docs.python.org/2/library/2to3.html#2to3fixer-idioms
2018-04-05 12:07:20 +01:00
Ed Morley c5a2e80b73 Bug 1451518 - Use next(obj) instead of obj.next()
Fixed via:
`futurize -w -n -f next_call .`
2018-04-05 12:07:20 +01:00
Ed Morley 20ca827cc0 Bug 1451518 - Use absolute instead of relative imports
Relative imports found by running:
`futurize -w -n -f absolute_import .`

...however then hand-edited to convert to absolute, and the newly added
`from __future__ import absolute_import` removed (since we mostly
don't use relative imports, and PEP8 prefers absolute).
2018-04-05 12:07:20 +01:00
Ed Morley e4b0f53788 Bug 1451518 - Add more 'from __future__ import print_function'
Generated by running:
`futurize -w -n -f print_with_import .`

...and then cleaning up import style using `isort -y`.

See:
39a066ed8c/src/libfuturize/fixes/fix_print_with_import.py
2018-04-05 12:07:20 +01:00
pyup.io bot aed6f4d8b3 Update webob from 1.7.4 to 1.8.0 (#3402) 2018-04-05 12:01:45 +01:00
Renovate Bot bdb99234c1 Update react monorepo packages 2018-04-05 11:53:55 +01:00
Cameron Dawson b946edf7a2
Bug 1450972 - Fix pin wrong job from failure summary tab (#3399) 2018-04-04 15:51:55 -07:00
pyup.io bot 2791d3d497 Update newrelic from 3.0.0.89 to 3.2.0.91 (#3396) 2018-04-04 21:18:05 +01:00
pyup.io bot eb4570d6b6 Update djangorestframework from 3.8.0 to 3.8.1 (#3397) 2018-04-04 21:04:08 +01:00
Ed Morley 163a94a2f6
Bug 1451428 - Remove unused settings panel (#3395)
Since it's hidden and has never been used.

The `thSettingsPanel.html` partial is a leftover from when this
feature was first added in 3e625f3 / 6b0c56e.
2018-04-04 20:34:26 +01:00
Ed Morley 3d50e32d4d
Bug 1357476 - Remove django-rest-swagger remnants (#3390)
These are leftover from 0aec43a (#3230).
2018-04-04 20:34:06 +01:00
pyup.io bot 4714ca1ee3 Update responses from 0.8.1 to 0.9.0 (#3394) 2018-04-04 20:01:38 +01:00
Cameron Dawson c7b050942d
Bug 1443129 - Add prop types to all JSX components (#3379)
* enable react/prop-types eslint rule
While enabling this, I set all the PropTypes as ``isRequired`` then ran the app
and wherever I hit issues where the value was undefined, then I removed ``isRequired``.

* Enable react/require-default-props eslint rule
In some cases "null" was the best default.  I think this is OK.  But having empty arrays
for others meant less checking in the actual code, so bonus!  :)
2018-04-04 10:23:48 -07:00
Cameron Dawson 0b5fec254a
Bug 1449240 - Convert Angular values.js to import-able constants (#3378)
After looking at these, I think I want to go back to using "th" prefix and "ph" prefix.
It is a nice way to see right off the bat that these are constants that are established
by our code and not some external library.  So converting ``platformMap`` back to
``thPlatformMap``.  It also makes for less code/blame churn as we move to imported
constants.

* Move thOptionOrder to constants.js
* Move thFailureResults to constants.js
* Move thRepoGroupOrder to constants.js
* Move thFavIcons to constants.js
* Move phCompareDefaultOriginalRepo to constants.js
* Move phCompareDefaultNewRepo to constants.js
* Move thDefaultRepo to constants.js
* Move thTitleSuffixLimit to constants.js
* Move phTimeRanges to constants.js
* Move thDateFormat to constants.js
* Move phDefaultTimeRangeValue to constants.js
* Move phTimeRangeValues to constants.js
* Move phBlockers to constants.js
* Move phDefaultFramework to constants.js
* Move phAlertSummaryStatusMap to constants.js
* Move phAlertSummaryIssueTrackersMap to constants.js
* Move phAlertStatusMap to constants.js
* Move thJobNavSelectors to constants.js
* Move thPerformanceBranches to constants.js
* Move phDashboardValues to dashboard.js
* Move phCompareBaseLineDefaultTimeRange to constants.js
* Move thPinboardCountError to constants.js
* Remove now-unused values.js
* Move thResultStatusFilters to constants.js
* Move thEvents to constants.js
* Move thAggregateIds to a aggregateIdHelper.js
* Move thReftestStatus to jobHelper.js
* Remove now-unused provider.js
2018-04-04 10:01:17 -07:00