[Debian-med-packaging] Bug#999479: mypy: please build-depend in python3-typeshed instead of individual python3-types-* packages

Antonio Terceiro terceiro at debian.org
Fri Nov 12 17:08:34 GMT 2021


Control: tag -1 + patch
Control: forwarded https://salsa.debian.org/med-team/mypy/-/merge_requests/2

On Fri, Nov 12, 2021 at 09:25:57AM +0100, Andreas Tille wrote:
> Hi Antonio,
> 
> Am Thu, Nov 11, 2021 at 02:14:21PM -0300 schrieb Antonio Terceiro:
> > typeshed is now in unstable. Please use python3-typeshed as build
> > dependency so we can remove the individual python3-types-* packages in
> > favor of typeshed.
> 
> I tried to do so ...
> 
> diff --git a/debian/control b/debian/control
> index e53840d0..10d17679 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -15,10 +15,7 @@ Build-Depends: debhelper-compat (= 13),
>                 python3-setuptools,
>                 python3-sphinx <!nodoc>,
>                 python3-sphinx-rtd-theme <!nodoc>,
> -               python3-typed-ast (>= 1.4.0),
> -               python3-typed-ast (<< 1.5.0),
> -               python3-types-toml,
> -               python3-types-typed-ast,
> +               python3-typeshed,
>                 python3-psutil,
>                 python3-mypy-extensions,
>                 python3-typing-extensions,

you only want to drop python3-types-toml and python3-types-typed-ast,
but not python3-typed-ast (note "types" vs "typed").

> ... but I get:
> 
> export TEST_MYPYC=1
> PYBUILD_SYSTEM=custom \
>         PYBUILD_TEST_ARGS="{interpreter} -m mypy \
>         --config-file {dir}/mypy_self_check.ini -p mypy" dh_auto_test
>         pybuild --test -i python{version} -p 3.9
> I: pybuild base:237: python3.9 -m mypy  --config-file /build/mypy-0.910/mypy_self_check.ini -p mypy
> mypy/dmypy_server.py:877: error: unused "type: ignore" comment
>             import psutil  # type: ignore  # It's not in typeshed yet
>             ^
> Found 1 error in 1 file (checked 162 source files)
> E: pybuild pybuild:354: test: plugin custom failed with: exit code=1: python3.9 -m mypy         --config-file /build/mypy-0.910/mypy_self_check.ini -p mypy
>         rm -fr -- /tmp/dh-xdg-rundir-ZEmBmRmU
> dh_auto_test: error: pybuild --test -i python{version} -p 3.9 returned exit code 13

python3-typeshed *does* provide typing information for psutil, so that
`# type: ignore` comment is now unused; mypy_self_check.ini sets
`warn_unused_ignores` to `True`; and despite its name,
`warn_unused_ignores` actually produces errors.

You want a patch that `# type: ignore` out. I send a MR with the exact
changes I think should be done:

https://salsa.debian.org/med-team/mypy/-/merge_requests/2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20211112/728b0548/attachment.sig>


More information about the Debian-med-packaging mailing list