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] [day] [month] [year] [list]
Message-ID: <CAGS_qxqUUX=V+DfYp8LnjxB03OeZVhaXpmg_8zW98zvJLCcZ6A@mail.gmail.com>
Date:   Mon, 1 May 2023 11:19:22 -0700
From:   Daniel Latypov <dlatypov@...gle.com>
To:     SeongJae Park <sj@...nel.org>
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, Johannes Berg <johannes.berg@...el.com>,
        regressions@...ts.linux.dev
Subject: Re: [PATCH v2 1/3] kunit: tool: add subscripts for type annotations
 where appropriate

On Mon, May 1, 2023 at 10:15 AM SeongJae Park <sj@...nel.org> wrote:
>

[snip]

> >
> > It seems like support for the subscript wasn't added until Python 3.9.
> >
> > I know support for subscripting other types like re.Pattern was added
> > in 3.9 per https://peps.python.org/pep-0585/ but it doesn't mention
> > Popen there...
> > This patch also added typing.IO[str] and concurrent.Future[None], so
> > those might be problematic too.
> >
> > Can you check if the typing.IO and concurrent.Future[None] changes
> > cause problems?
> > (I don't have an easy way of testing against older Python versions currently).
>
> Thank you for quick reply.  Reverting Popen changes only as below fixed my
> issue.  So seems typing.IO and concurrent.Future[None] chages doesn't cause
> problems at least for my use case.

Sounds good.
Sent https://lore.kernel.org/linux-kselftest/20230501181610.2617032-1-dlatypov@google.com

I was hoping adding `--python-version 3.7` to the `mypy --strict`
invocation would help, but it still fails for me :\

$ ./tools/testing/kunit/run_cheks.py
...
mypy: FAILED
> kunit_kernel.py:95: error: Missing type parameters for generic type "Popen"  [type-arg]
> kunit_kernel.py:116: error: Missing type parameters for generic type "Popen"  [type-arg]
> kunit_kernel.py:145: error: Missing type parameters for generic type "Popen"  [type-arg]
> Found 3 errors in 1 file (checked 8 source files)

And here I was, hoping it would complain about code incompatible with
python 3.7...
But at the very least, that patch should fix the current problem.

Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ