Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #13568

Re: mypy and typeshed

Path csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!bofh.it!news.nic.it!robomod
From "Michael R. Crusoe" <crusoe@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: mypy and typeshed
Date Thu, 23 Sep 2021 10:00:04 +0200
Message-ID <D0rOc-mI-67@gated-at.bofh.it> (permalink)
References <D0o3T-6pf-1@gated-at.bofh.it>
X-Original-To Stuart Prescott <stuart@debian.org>
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Sep 23 07:42:12 2021
Old-Return-Path <michael.crusoe@gmail.com>
X-Amavis-Spam-Status No, score=0.518 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, BLOGSPOT=3, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=2, LDO_WHITELIST=-5, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, URI_TRY_3LD=1.999] autolearn=no autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-vs1-f41.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5
X-Gm-Message-State AOAM533ZWVv7sb/ECgOrf44pHR8XylKo2z2ETABs2WbEcYSRlEcGEZKi 8WKXrFum2V3qBB8C6YDISv+xvOE52oeurA==
X-Google-SMTP-Source ABdhPJwVpB67qzVFnC9bVIOevYi3zXUcWmYg4jl7+lSj8dlxg1s9UY9t4L6ILcVSZacFq3dFz+0LmA==
X-Received by 2002:a05:6102:80f:: with SMTP id g15mr2986335vsb.56.1632381939722; Thu, 23 Sep 2021 00:25:39 -0700 (PDT)
X-Received by 2002:a05:6102:3548:: with SMTP id e8mr3036847vss.44.1632381938937; Thu, 23 Sep 2021 00:25:38 -0700 (PDT)
MIME-Version 1.0
X-Gmail-Original-Message-ID <CAD=WrcJTNDQqgEa5rgSK44huxt2emnm1v64gFmmALOEc5OD1Pg@mail.gmail.com>
Content-Type multipart/alternative; boundary="0000000000009bb8dd05cca489e1"
X-Mailing-List <debian-python@lists.debian.org> archive/latest/19364
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/CAD=WrcJTNDQqgEa5rgSK44huxt2emnm1v64gFmmALOEc5OD1Pg@mail.gmail.com
Approved robomod@news.nic.it
Lines 154
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc Debian Python <debian-python@lists.debian.org>
X-Original-Date Thu, 23 Sep 2021 09:25:26 +0200
X-Original-Message-ID <CAD=WrcJTNDQqgEa5rgSK44huxt2emnm1v64gFmmALOEc5OD1Pg@mail.gmail.com>
X-Original-References <2252926.q746WjKLvy@simurgh>
Xref csiph.com linux.debian.maint.python:13568

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Sep 23, 2021 at 5:51 AM Stuart Prescott <stuart@debian.org> wrote:

> Hi Michael
>

Hello Stuart,


> thanks for uploading the new version of mypy :)
>

You are welcome!

>
> With the new mypy, it seems one needs a "pip install types-foo" for just
> about
> everything before it is able to usefully analyse code. I see #994830 for
> python-types-dataclasses, and we have python3-types-toml plus
> python3-types-
> typed-ast.
>
> Are you already working towards packaging more of the split off typeshed,
> or
> do we need a bit more of a team effort on this?
>

Good question; my answer is a question for you and the Debian Python Team:

Do we package mypy to [A] support other packages, or are we trying to [B]
deliver a "complete" offline developer experience? (even if that means
shipping type hints for python packages not in Debian)

If the goal is [A], then we should stick to the add-hoc approach:
"python-types-*" packages will only be made as needed for building other
Debian source packages in our archives. In this instance, developers using
the packaged version of mypy can use `mypy --install-types' to pull down
the packages they need from PyPI to their local system/virtualenv.

http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html

If the goal is [B], then we need to be comprehensive.

Either way we choose, updates to these type hints may need to be made (and
patches applied) to match the versions of the Python packages in the
archive (if they have fallen behind or ahead of what is in the typeshed
repository).


> Does it make sense for Debian to package snapshots of all of typeshed in
> one
> binary package to save a proliferation of small python-types-foo packages?
>

Hmm..  a joint source package makes sense (and might save the FTP team from
reviewing 103 additional submissions), but as each "types-*" package in
PyPI has its own public version it would be weird to not match their
versions at all.

Though I guess the monolithic package could have a very long "Provides"
line mentioning all the components and their versions.

The Copyright file will be interesting! For the two "python-types-*"
packages I created by hand, I had to dig up the author information from the
git history at the urging of the FTP gatekeepers :-)

Personally I'm more of an [A] person (out of laziness), but I won't block
the [B] approach if there is sufficient interest that it doesn't primarily
fall on my shoulders.

Feedback from the wider Debian Python community is welcome!

P.S. From the [A] perspective python-types-dataclasses is not needed as
that is a backport for Python <= 3.5 so I'm working with the maintainer of
typedload at https://github.com/ltworf/typedload/pull/229 to fix that need
so that mypy 0.910 is unblocked from moving to Debian Testing.

Cheers,

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

mypy and typeshed Stuart Prescott <stuart@debian.org> - 2021-09-23 06:00 +0200
  Re: mypy and typeshed "Michael R. Crusoe" <crusoe@debian.org> - 2021-09-23 10:00 +0200
    Re: mypy and typeshed Antonio Terceiro <terceiro@debian.org> - 2021-09-30 21:40 +0200
      Re: mypy and typeshed Antonio Terceiro <terceiro@debian.org> - 2021-10-01 13:20 +0200
        Re: mypy and typeshed Antonio Terceiro <terceiro@debian.org> - 2021-10-01 16:50 +0200

csiph-web