Bug#1043266: python3-mypy: stub error message could point to python3-typeshed package

2023-10-05 Thread Michael R. Crusoe

control: tags -1 help newcomer

This is a good suggestion. I would happily review a merge request to 
implement this


--
Michael R. Crusoe



OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1043266: python3-mypy: stub error message could point to python3-typeshed package

2023-08-08 Thread Markus Demleitner
Package: python3-mypy
Version: 1.0.1-1
Severity: minor

Dear Maintainer,

When mypy notices missing stubs for a package that has stubs on typeshed, it
currently writes something like:

  utils/imgtools.py:17: error: Library stubs not installed for "PIL"  [import]
  utils/imgtools.py:17: note: Hint: "python3 -m pip install types-Pillow"
  utils/imgtools.py:17: note: (or run "mypy --install-types" to install all
missing stub packages)
  utils/imgtools.py:17: note: See
https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

-- both recommendations are arguably wrong when the package-installed mypy runs
(and hence it stands to reason that it's the Debian-managed python running).
So, perhaps this message could be changed to

  Hint: On Debian systems, you can install the python3-typeshed package to
provide mypy with stubs for many popular libraries.  In virtual python
environments, you can instead run mypy --install-types for upstream stubs.

or something similar?


-- System Information:
Debian Release: 12.1
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'oldstable-updates'), (500, 
'stable')
Architecture: i386 (x86_64)

Kernel: Linux 6.1.38 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages python3-mypy depends on:
ii  libc6  2.36-9+deb12u1
ii  python33.11.2-1+b1
ii  python3-mypy-extensions0.4.3-4
ii  python3-pkg-resources  66.1.1-1
ii  python3-psutil 5.9.4-1+b1
ii  python3-typing-extensions  4.4.0-1

Versions of packages python3-mypy recommends:
ii  python3-lxml4.9.2-1+b1
ii  python3-setuptools  66.1.1-1

python3-mypy suggests no packages.

-- no debconf information