lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230501191039.140496-1-sj@kernel.org>
Date:   Mon,  1 May 2023 19:10:39 +0000
From:   SeongJae Park <sj@...nel.org>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     brendanhiggins@...gle.com, davidgow@...gle.com, rmoar@...gle.com,
        linux-kernel@...r.kernel.org, kunit-dev@...glegroups.com,
        linux-kselftest@...r.kernel.org, skhan@...uxfoundation.org,
        johannes@...solutions.net, SeongJae Park <sj@...nel.org>
Subject: Re: [PATCH] kunit: tool: undo type subscripts for subprocess.Popen

On Mon, 1 May 2023 11:16:10 -0700 Daniel Latypov <dlatypov@...gle.com> wrote:

> Writing `subprocess.Popen[str]` requires python 3.9+.
> kunit.py has an assertion that the python version is 3.7+, so we should
> try to stay backwards compatible.
> 
> This conflicts a bit with commit 1da2e6220e11 ("kunit: tool: fix
> pre-existing `mypy --strict` errors and update run_checks.py"), since
> mypy complains like so
> > kunit_kernel.py:95: error: Missing type parameters for generic type "Popen"  [type-arg]
> 
> Note: `mypy --strict --python-version 3.7` does not work.
> 
> We could annotate each file with comments like
>   `# mypy: disable-error-code="type-arg"
> but then we might still get nudged to break back-compat in other files.
> 
> This patch adds a `mypy.ini` file since it seems like the only way to
> disable specific error codes for all our files.
> 
> Note: run_checks.py doesn't need to specify `--config_file mypy.ini`,
> but I think being explicit is better, particularly since most kernel
> devs won't be familiar with how mypy works.

Thank you for fast fix!

> 
> Fixes: 695e26030858 ("kunit: tool: add subscripts for type annotations where appropriate")
> Reported-by: SeongJae Park <sj@...nel.org>
> Link: https://lore.kernel.org/linux-kselftest/20230501171520.138753-1-sj@kernel.org
> Signed-off-by: Daniel Latypov <dlatypov@...gle.com>

Tested-by: SeongJae Park <sj@...nel.org>


Thanks,
SJ

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ