[PATCH 0/4] python: update linting for new mypy/pylint releases

John Snow posted 4 patches 3 weeks, 1 day ago
python/scripts/mkvenv.py      |  3 +++
python/setup.cfg              |  1 +
tests/qemu-iotests/iotests.py | 11 +++++++----
tests/qemu-iotests/pylintrc   |  1 +
4 files changed, 12 insertions(+), 4 deletions(-)
[PATCH 0/4] python: update linting for new mypy/pylint releases
Posted by John Snow 3 weeks, 1 day ago
Various python tests in the "check-python-tox" test case on GitLab have
begun failing due to newer package versions. This patch set corrects
those issues and also improves the reliability of local developer tests
which may be using these tooling versions outside of GitLab pinned
version tests.

There are remaining issues with the "check-dev" test I have yet to
rectify, but appear unrelated to linter versions specifically and will
be handled separately.

As a result of this patch, the optionally-run and may-fail
"check-python-tox" test case on GitLab will become green again, and
local invocations of "make check-tox" in the python subdirectory will
also pass again. "check-python-minreqs" on GitLab and "make
check-minreqs" in the local developer environment were/are
unaffected. local iotest invocations for test case #297 ought to now
begin passing on developer workstations with bleeding-edge python
packages.

John Snow (4):
  iotests: reflow ReproducibleTestRunner arguments
  iotests: correct resultclass type in ReproducibleTestRunner
  python: disable too-many-positional-arguments warning
  python: silence pylint raising-non-exception error

 python/scripts/mkvenv.py      |  3 +++
 python/setup.cfg              |  1 +
 tests/qemu-iotests/iotests.py | 11 +++++++----
 tests/qemu-iotests/pylintrc   |  1 +
 4 files changed, 12 insertions(+), 4 deletions(-)

-- 
2.47.0

Re: [PATCH 0/4] python: update linting for new mypy/pylint releases
Posted by Kevin Wolf 2 weeks, 3 days ago
Am 01.11.2024 um 18:36 hat John Snow geschrieben:
> Various python tests in the "check-python-tox" test case on GitLab have
> begun failing due to newer package versions. This patch set corrects
> those issues and also improves the reliability of local developer tests
> which may be using these tooling versions outside of GitLab pinned
> version tests.
> 
> There are remaining issues with the "check-dev" test I have yet to
> rectify, but appear unrelated to linter versions specifically and will
> be handled separately.
> 
> As a result of this patch, the optionally-run and may-fail
> "check-python-tox" test case on GitLab will become green again, and
> local invocations of "make check-tox" in the python subdirectory will
> also pass again. "check-python-minreqs" on GitLab and "make
> check-minreqs" in the local developer environment were/are
> unaffected. local iotest invocations for test case #297 ought to now
> begin passing on developer workstations with bleeding-edge python
> packages.
> 
> John Snow (4):
>   iotests: reflow ReproducibleTestRunner arguments
>   iotests: correct resultclass type in ReproducibleTestRunner
>   python: disable too-many-positional-arguments warning
>   python: silence pylint raising-non-exception error

Thanks, applied to the block branch.

(Yes, of course I had to wait until I ran into the problem patch 2 fixes
myself, and after figuring out the fix from the incomprehensible error
message, I found that this series already contains it.)

Kevin
Re: [PATCH 0/4] python: update linting for new mypy/pylint releases
Posted by John Snow 2 weeks, 2 days ago
On Wed, Nov 6, 2024 at 4:57 AM Kevin Wolf <kwolf@redhat.com> wrote:

> Am 01.11.2024 um 18:36 hat John Snow geschrieben:
> > Various python tests in the "check-python-tox" test case on GitLab have
> > begun failing due to newer package versions. This patch set corrects
> > those issues and also improves the reliability of local developer tests
> > which may be using these tooling versions outside of GitLab pinned
> > version tests.
> >
> > There are remaining issues with the "check-dev" test I have yet to
> > rectify, but appear unrelated to linter versions specifically and will
> > be handled separately.
> >
> > As a result of this patch, the optionally-run and may-fail
> > "check-python-tox" test case on GitLab will become green again, and
> > local invocations of "make check-tox" in the python subdirectory will
> > also pass again. "check-python-minreqs" on GitLab and "make
> > check-minreqs" in the local developer environment were/are
> > unaffected. local iotest invocations for test case #297 ought to now
> > begin passing on developer workstations with bleeding-edge python
> > packages.
> >
> > John Snow (4):
> >   iotests: reflow ReproducibleTestRunner arguments
> >   iotests: correct resultclass type in ReproducibleTestRunner
> >   python: disable too-many-positional-arguments warning
> >   python: silence pylint raising-non-exception error
>
> Thanks, applied to the block branch.
>

Thank you!


>
> (Yes, of course I had to wait until I ran into the problem patch 2 fixes
> myself, and after figuring out the fix from the incomprehensible error
> message, I found that this series already contains it.)
>

Sorry O:-)

The only issue remaining I'm aware of (besides the broader problem of
iotests not using pinned versions yet) is that "make check-dev" is failing
due to (maybe?) some changes in bleeding edge setuptools (?) that impact
how editable packages are installed. That test is only ever manually run
and developer-local though, so I think it shouldn't get in anyone's way but
mine.

If there's something else you're noticing, I'm unaware of it atm and you
should definitely let me know about it.


>
> Kevin
>
>