Commit graph

116 commits

Author SHA1 Message Date
Sylvestre Ledru
3de663bf52 Bug 1782696 - Update dependency pylint to v2.14.5 r=linter-reviewers,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D153955
2022-08-23 09:55:19 +00:00
renovate[bot]
078e93eeac no bug - Update dependency colorama to v0.4.5 r=linter-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D154874
2022-08-17 13:46:04 +00:00
Sylvestre Ledru
4def815e85 Bug 1784857 - be consistent in the mccabe version r=linter-reviewers,andi
Depends on D154642

Differential Revision: https://phabricator.services.mozilla.com/D154643
2022-08-15 20:09:06 +00:00
Sylvestre Ledru
a516a4f498 Bug 1784857 - Update to flake8 5.0.4 r=linter-reviewers,ahal
One of the argument has been renamed here:
8d3afe40e1

Depends on D154641

Differential Revision: https://phabricator.services.mozilla.com/D154642
2022-08-15 20:09:06 +00:00
Iulian Moraru
480242bffe Backed out changeset aac498e445a2 (bug 1782696) for causing py3 mozlint failures. CLOSED TREE 2022-08-09 14:40:44 +03:00
renovate[bot]
8c730122d1 Bug 1782696 - Update dependency pylint to v2.14.5 r=linter-reviewers,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D153955
2022-08-09 09:18:00 +00:00
Sylvestre Ledru
961144a29f Bug 1762038 - mozlint: Update to pylint v2.13.5 r=linter-reviewers,ahal
Depends on D142376

Differential Revision: https://phabricator.services.mozilla.com/D142171
2022-08-01 17:29:20 +00:00
Iulian Moraru
a8bbd6fe08 Backed out 2 changesets (bug 1762038, bug 1762037) for causing py3 failures. CLOSED TREE
Backed out changeset 3aa4f53b5325 (bug 1762038)
Backed out changeset 275ed0b3da7b (bug 1762037)
2022-06-08 03:09:30 +03:00
Sylvestre Ledru
1f05a012cc Bug 1762038 - mozlint: Update to pylint v2.13.5 r=linter-reviewers,ahal
Depends on D142376

Differential Revision: https://phabricator.services.mozilla.com/D142171
2022-06-07 22:14:31 +00:00
Andrew Halberstadt
4e7c111145 Bug 1761502 - Make l10n linter error less scary when Mercurial doesn't exist, r=linter-reviewers,sylvestre
This case can happen for Git users.

Differential Revision: https://phabricator.services.mozilla.com/D143601
2022-04-14 13:02:50 +00:00
Mitchell Hentges
65ffc413f9 Bug 1761507: Bump typed-ast version r=ahal
This should resolve a `./mach lint` incompatibility with
Python 3.10.

Differential Revision: https://phabricator.services.mozilla.com/D142337
2022-03-29 19:14:08 +00:00
Mitchell Hentges
e913081903 Bug 1751795: Log more information if pip_install_requirements fails r=ahal
In addition to showing the `pip check` failure, also show:
* The `pip install --requirements ...` output
* The output of `pip list -v`
* The path to the `requirements.txt` file and the affected site.

To get sufficient detail of `pip install --requirements` to display
if the subsequent `pip check` call failed, I had to remove the
`--quiet` parameter. It was replicated by hiding _all_ output
if `quiet=True` and `pip install` succeeds - this is different to
the previous behaviour, where warnings would still poke through,
even if `quiet=True` and the install succeeded.
This was the only way to make it work such that all output would
be available without having to run `pip install` twice (which would
likely get different output the second time). Besides, there weren't
many warnings triggering this edge case, so the change in behaviour is
probably acceptable.

Additionally, in both places doing `pip check`
(post-install-requirements and when doing system-package compatibility
checking), move the `pip check` output to happen last, so that users
don't need to scroll to the top of the `pip list` wall of text to find
the reason for their command failure.

Differential Revision: https://phabricator.services.mozilla.com/D137206
2022-02-03 21:51:49 +00:00
Rob Lemley
87150cdcab Bug 1748288 - Update typed-ast dependency in pylint and black linters. r=linter-reviewers,ahal
Black and PyLint linters fail to install with Python 3.10 because of typed-ast.
typed-ast 1.4.3 added support for Python 3.10.

Differential Revision: https://phabricator.services.mozilla.com/D135538
2022-01-10 22:32:27 +00:00
Mitchell Hentges
6571032077 Bug 1739067: Scope Mach virtualenv to be checkout-specific r=perftest-reviewers,ahal,sparky
Build and run the Mach virtualenv from a `state_dir` that is
"specific-to-topsrcdir".

As part of this, move `get_state_dir()` to `mach` so that it's usable
before `sys.path` entries are fully set up.

Differential Revision: https://phabricator.services.mozilla.com/D130383
2021-11-29 22:33:54 +00:00
Sylvestre Ledru
d6ba1a7419 Bug 1707591 - ride along: update of the flake8 dep to match black's r=linter-reviewers,ahal
Depends on D131717

Differential Revision: https://phabricator.services.mozilla.com/D131718
2021-11-22 22:10:04 +00:00
Sylvestre Ledru
c9ed427926 Bug 1707591 - ride along: update of the pylint dep to match black's r=linter-reviewers,ahal
Depends on D130965

Differential Revision: https://phabricator.services.mozilla.com/D131717
2021-11-22 22:10:03 +00:00
Sylvestre Ledru
0bd2d56002 Bug 1707591 - Update to black 21.11b1 r=gerard-majax
Depends on D131716

Differential Revision: https://phabricator.services.mozilla.com/D130964
2021-11-22 22:10:03 +00:00
Sylvestre Ledru
0369d71fc0 Bug 1707591 - Parse the new output of black --version r=linter-reviewers,ahal
Depends on D126202

Differential Revision: https://phabricator.services.mozilla.com/D131716
2021-11-22 22:10:02 +00:00
Renovate Bot
d7e0dac10a Bug 1731749 - Update dependency pylint to v2.11.1 r=linter-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D126202
2021-11-22 22:10:02 +00:00
Iulian Moraru
897bb9d353 Backed out 2 changesets (bug 1707591) for causing python mozlint failures on test_yaml.py. CLOSED TREE
Backed out changeset a730ab2d0dbe (bug 1707591)
Backed out changeset 0269849fd7ef (bug 1707591)
2021-11-12 18:44:36 +02:00
Sylvestre Ledru
372b8d509f Bug 1707591 - Update to black 21.10b0 r=gerard-majax
Differential Revision: https://phabricator.services.mozilla.com/D130964
2021-11-12 15:06:55 +00:00
Renovate Bot
8ec610cce9 no bug - Update dependency autopep8 to v1.6.0 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D129355
2021-10-24 21:33:48 +00:00
Mathew Hodson
05af5b9c98 Bug 1735681 - Add colorama to pylint_requirements.in. r=ahal
This makes sure colorama stays in pylint_requirements.txt next
time someone regenerates it on a non-Windows machine. Since
colorama is only required by pylint on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D128426
2021-10-14 13:14:02 +00:00
Mathew Hodson
3df2d4789a Bug 1734971 - Add pylint requirements for Windows. r=linter-reviewers,sylvestre
This adds colorama, which is required by pylint only on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D128007
2021-10-13 17:05:42 +00:00
Renovate Bot
c9b15cac97 no bug - Update dependency flake8 to v4 r=linter-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128092
2021-10-13 14:16:38 +00:00
Sylvestre Ledru
9d070b0060 Bug 1729222 - Update dependency pylint to v2.10.2 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124577
2021-09-06 13:14:41 +00:00
Renovate Bot
1113c30475 Bug 1729222 - move pylint req to .in r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124576
2021-09-06 13:14:41 +00:00
Renovate Bot
8fe3ab6fd8 Bug 1729222 - Update dependency flake8 to 3.9.2 and autopep8 to v1.5.7 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124575
2021-09-06 07:52:57 +00:00
Nick Alexander
16ab993262 Bug 1713683 - Run setup function with lintargs including log and virtual env binary path. r=ahal
This was oversight from Bug 1713178, which made black's `setup`
function require them but didn't bump the test.

Differential Revision: https://phabricator.services.mozilla.com/D116493
2021-06-02 21:24:49 +00:00
Nick Alexander
a8f3540069 Bug 1713178 - Make black linter setup avoid updating the virtualenv if it's installed. r=ahal
This could be easily generalized to avoid the updating the virtualenv
more generally, but I think this functionality should be in the
`virtualenv_manager` -- something like `install_pip_binary(...)` -- so
I've just done the most impactful example here.

Differential Revision: https://phabricator.services.mozilla.com/D116148
2021-05-31 21:44:05 +00:00
Mitchell Hentges
df45b126d1 Bug 1698616: Bump python dependencies r=firefox-build-system-reviewers,glandium
Did you know that our version of requests was from 2015? Phwoar!
This bumps `jinja2`, `py`, `pyyaml`, `requests` and `urllib3`.
There's significant risk for regressions due to breaking changes,
though due to the dynamic nature of Python, they're tricky to track
down.

The potential breaking changes I'm expecting to potentially affect
us are:

* `requests@2.11.0`: No longer accepts non-strings as header values.
* `requests@2.16.0`: `requests.packages` namespace was removed due to
  packages no longer being vendored. The namespace has been
  incrementally restored over future releases, but it's unclear to
  what degree.
* `requests@2.24.0`: Redirect resolution now only happens when
  `allow_redirects` is `True`.
* `requests` version of `urllib3` was bumped from `1.13.1` to `1.26`,
  unsure what repercussions that will have.

This also added dependencies to `flake8_requirements`. This is because
the vendored `importlib-metadata` update (and the new
`typing-extensions` dependency) is found by `pip`, but the
vendored `typing-extensions` is _not_ discovered (perhaps due to
details around "eggs" and the way we add vendored code to the sys.path).
So, `pip` tries to install it manually and fails when it finds no hash.
By re-compiling `flake8_requirements`, the necessary hashes are made
available.

Differential Revision: https://phabricator.services.mozilla.com/D108526
2021-05-04 20:43:26 +00:00
imoraru
63d199a7e6 Backed out changeset b413fce77522 (bug 1698616) for breaking mach commands (bug 1706456). a=backout 2021-04-21 14:16:08 +03:00
Mitchell Hentges
73f81b1c85 Bug 1698616: Bump python dependencies r=firefox-build-system-reviewers,glandium
Did you know that our version of requests was from 2015? Phwoar!
This bumps `jinja2`, `py`, `pyyaml`, `requests` and `urllib3`.
There's significant risk for regressions due to breaking changes,
though due to the dynamic nature of Python, they're tricky to track
down.

The potential breaking changes I'm expecting to potentially affect
us are:

* `requests@2.11.0`: No longer accepts non-strings as header values.
* `requests@2.16.0`: `requests.packages` namespace was removed due to
  packages no longer being vendored. The namespace has been
  incrementally restored over future releases, but it's unclear to
  what degree.
* `requests@2.24.0`: Redirect resolution now only happens when
  `allow_redirects` is `True`.
* `requests` version of `urllib3` was bumped from `1.13.1` to `1.26`,
  unsure what repercussions that will have.

This also added dependencies to `flake8_requirements`. This is because
the vendored `importlib-metadata` update (and the new
`typing-extensions` dependency) is found by `pip`, but the
vendored `typing-extensions` is _not_ discovered (perhaps due to
details around "eggs" and the way we add vendored code to the sys.path).
So, `pip` tries to install it manually and fails when it finds no hash.
By re-compiling `flake8_requirements`, the necessary hashes are made
available.

Differential Revision: https://phabricator.services.mozilla.com/D108526
2021-04-20 13:57:47 +00:00
championshuttler
1f5055fa54 Bug 1700423 - Remove py2 and py3 linters and their config from taskcluster.r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D109647
2021-03-26 05:26:42 +00:00
Sylvestre Ledru
4b843f1ebf Bug 1699950 - mozlint/flake8: also update autopep8 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109234
2021-03-22 07:18:38 +00:00
Sylvestre Ledru
33d0032fc3 Bug 1699950 - Update to flake8 3.9.0 r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109222
2021-03-22 07:18:38 +00:00
Sylvestre Ledru
8ffdec6355 Bug 1699950 - mozlint/flake8: Move to pip-compile r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D109221
2021-03-22 07:18:37 +00:00
Alex Lopez
56dc4c7787 Bug 1682959 - Update pylint dependencies to ensure compatibility. r=mhentges
Conflicting pylint requirements were causing the new pip dependency resolver
to report an error. This updates the dependencies for pylint (using the hashin package)
so that the conflict is resolved.

Differential Revision: https://phabricator.services.mozilla.com/D106154
2021-02-25 18:36:59 +00:00
Renovate Bot
bd82b1c554 no bug - Update dependency pylint to v2.6.2 r=linter-reviewers,andi DONTBUILD
Depends on D105298

Differential Revision: https://phabricator.services.mozilla.com/D105299
2021-02-16 12:57:04 +00:00
Akshat Dixit
ad11827401 Bug 1591991 Add lint Fixed count support to linters r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D102082
2021-02-08 19:00:10 +00:00
Sylvestre Ledru
f3bf06a03a Bug 1690745 - mozlint: Update to autopep8 1.5.5 r=linter-reviewers,marco,andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104007
2021-02-04 10:00:13 +00:00
Mitchell Hentges
f4a03e538f Bug 1680802: Install pylint requirements with legacy resolver r=firefox-build-system-reviewers,sheehan,glandium
pylint_requirements.txt fail to install with the new pip resolver due
to a conflict between astroid and lazy-object-proxy.
Rather than bumping those packages and handling the potential fallout,
the package-upgrade has been deferred and we will use the legacy
resolver in the interrim.

Differential Revision: https://phabricator.services.mozilla.com/D99940
2021-01-05 20:14:25 +00:00
Cosmin Sabou
8a46d2e9d6 Backed out 3 changesets (bug 1680802, bug 1680630) for turning Bug 1521378 into permafail. CLOSED TREE
Backed out changeset 3464c8f10994 (bug 1680630)
Backed out changeset 591d32364c0f (bug 1680802)
Backed out changeset 3e9350fd509d (bug 1680802)
2021-01-04 18:47:44 +02:00
Mitchell Hentges
cdf668d1ae Bug 1680802: Install pylint requirements with legacy resolver r=firefox-build-system-reviewers,sheehan,glandium
pylint_requirements.txt fail to install with the new pip resolver due
to a conflict between astroid and lazy-object-proxy.
Rather than bumping those packages and handling the potential fallout,
the package-upgrade has been deferred and we will use the legacy
resolver in the interrim.

Differential Revision: https://phabricator.services.mozilla.com/D99940
2021-01-04 15:20:21 +00:00
championshuttler
be0f060c18 Bug 1679073 - Print Version of Pylint in logs.r=sylvestre,linter-reviewers DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D99712
2020-12-15 11:22:59 +00:00
Renovate Bot
b1cecbf72f Bug 1679065 - Update dependency pylint to v2.6.0 r=linter-reviewers,marco DONTBUILD
Reported here: https://github.com/sylvestre/gecko-dev/pull/207/files

Differential Revision: https://phabricator.services.mozilla.com/D97896
2020-11-23 21:22:30 +00:00
championshuttler
41d3960fca Bug 1679056 - Update to flake8 3.8.4.r=sylvestre
PR can be found here:
https://github.com/sylvestre/gecko-dev/pull/165

./mach lint -l flake8

Differential Revision: https://phabricator.services.mozilla.com/D97895
2020-11-23 20:27:21 +00:00
Ricky Stewart
7860c29e4c Bug 1674923 - Pass down virtualenv_manager from mach lint down to linters r=ahal
Before, on Windows, this resulted in installing the package in the parent environment (not the `virtualenv`). We fix this by passing down the `virtualenv_manager` so linters can install packages they need using that object's helper methods.

Differential Revision: https://phabricator.services.mozilla.com/D95738
2020-11-06 20:51:16 +00:00
Ricky Stewart
fe502f41e1 Bug 1660338 - Pass down location of virtualenv bin directory from mach lint invocation down to linters r=ahal
The logic the `black` and `flake8` linters were using to find the location of the appropriate binaries for linting was wrong in certain cases given how `mach lint` uses subprocesses to batch work. Instead, we allow the option to override the old janky behavior with a known-good path.

Differential Revision: https://phabricator.services.mozilla.com/D95396
2020-10-31 04:42:11 +00:00
Sylvestre Ledru
da34b6a58e Bug 1661514 - Reformat some python files with black 20.8b1 r=rstewart
# ignore-this-changeset

Depends on D88711

Differential Revision: https://phabricator.services.mozilla.com/D88712
2020-09-07 14:05:10 +00:00