• mypy and typeshed

    From Stuart Prescott@21:1/5 to All on Thu Sep 23 06:00:01 2021
    Hi Michael

    thanks for uploading the new version of mypy :)

    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?

    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?

    cheers
    Stuart


    --
    Stuart Prescott http://www.nanonanonano.net/ stuart@nanonanonano.net Debian Developer http://www.debian.org/ stuart@debian.org
    GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael R. Crusoe@21:1/5 to stuart@debian.org on Thu Sep 23 10:00:04 2021
    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,

    <div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 23, 2021 at 5:51 AM Stuart Prescott &lt;<a href="mailto:stuart@debian.org" target="_blank">stuart@debian.org</a>&gt; wrote:<br></div><
    blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Michael<br></blockquote><div><br></div><div>Hello Stuart,</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px
    0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

    thanks for uploading the new version of mypy :)<br></blockquote><div><br></div><div>You are welcome! <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

    With the new mypy, it seems one needs a &quot;pip install types-foo&quot; for just about <br>
    everything before it is able to usefully analyse code. I see #994830 for <br> python-types-dataclasses, and we have python3-types-toml plus python3-types-<br>
    typed-ast.<br>

    Are you already working towards packaging more of the split off typeshed, or <br>
    do we need a bit more of a team effort on this?<br></blockquote><div><br></div><div>Good question; my answer is a question for you and the Debian Python Team:</div><div><br></div><div> Do we package mypy to [A] support other packages, or are we trying to
    [B] deliver a &quot;complete&quot; offline developer experience? (even if that means shipping type hints for python packages not in Debian)<br></div><div><br></div><div>If the goal is [A], then we should stick to the add-hoc approach: &quot;python-types-*
    &quot; 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&#39; to pull down the packages they need from PyPI to
    their local system/virtualenv.</div><div><br></div><div><a href="http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html" target="_blank">http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html</a></div><div><br></div><div>If the goal is [B],
    then we need to be comprehensive.</div><div><br></div><div>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). </div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    Does it make sense for Debian to package snapshots of all of typeshed in one <br>
    binary package to save a proliferation of small python-types-foo packages? <br></blockquote><div><br></div><div>Hmm..  a joint source package makes sense (and might save the FTP team from reviewing 103 additional submissions), but as each &quot;types-*&
    quot; package in PyPI has its own public version it would be weird to not match their versions at all.</div><div><br></div><div>Though I guess the monolithic package could have a very long &quot;Provides&quot; line mentioning all the components and their
    versions.</div><div><br></div><div> The Copyright file will be interesting! For the two &quot;python-types-*&quot; packages I created by hand, I had to dig up the author information from the git history at the urging of the FTP gatekeepers :-)<br></div><
     </div><div>Personally I&#39;m more of an [A] person (out of laziness), but I won&#39;t block the [B] approach if there is sufficient interest that it doesn&#39;t primarily fall on my shoulders.<br></div><div><br></div><div>Feedback from the wider
    Debian Python community is welcome!</div><div><br></div><div>P.S. From the [A] perspective python-types-dataclasses is not needed as that is a backport for Python &lt;= 3.5 so I&#39;m working with the maintainer of typedload at <a href="https://github.
    com/ltworf/typedload/pull/229">https://github.com/ltworf/typedload/pull/229</a> to fix that need so that mypy 0.910 is unblocked from moving to Debian Testing.<br></div><div><br></div><div>Cheers,<br></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antonio Terceiro@21:1/5 to Michael R. Crusoe on Thu Sep 30 21:40:02 2021
    On Thu, Sep 23, 2021 at 09:25:26AM +0200, Michael R. Crusoe wrote:
    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.

    Particularly, I try to develop all my Python work against Debian, and
    having a mypy that is broken by default without installing stuff that is
    not in the Debian archive is a major incovenience.

    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!

    Maybe I didn't dedicate enough time for this, but I couldn't figure out
    how the pypi packages are produced from the git repository. Knowing this
    would help creating such typeshed package by means of some scripting
    (not necessarily volunteering, will be happy if someone beats me to it).

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmFWEAwACgkQ/A2xu81G C9654BAA1VwJvnY1Ie24TcAx6A+LoICpahqjr9J2BAzXyB8BdYggowtXCOf4PO/Q 0/XDI7DWwMY8VxvaKRofLQz+IFsy+NtPW0shi9OgboZDPzxOCcozdyycxeSxpUS8 C01j4dBbYMO+ClrgZvpF9wutMWt7ye9pDNHvzos/S9YexKNQtI9xKe2uVjeZSH25 tHs9hBW8GMc5S8a/tQWh9i7pLcoOSjQK87v8KN21Blv5k64ihCtrilPmKlxX26Sw 6iYlHRs3ZuVbo4wTVSuhfTzA9yxc4AiEyYAcb7tyjKRoFmzljho7DPxroLsT8KZp Oa3QPWwa/l+zq6CARH9f7yPAuZ+sMBB5EkMtV7BGfRJfrcz3gUkvsbavcLStjKlg X9fiFmCL43eoWDpGX5ivwB7IZ/3DllC09loQvl4qHUOAi6PzTk4kNL1AuatPnyHm aWW+faU4BiETe5X9VJgtoiEmndVXYmVS/GCTCpyLeZe660g/yvZ2SYxzTfNgYLhH z4ycc9U+/wyBPJWvwoqgXuPd9ZNMlsQQP5YAPgS2KVNeZdWB4v+OlzeGP6Q4oB2c aOBug+6w/XHFnSi4rgwEIqtZ0hC2PCFyyideOGdq57vuKQqtGb9RnSzezyB24bYJ RME2NrRgld922u9Q5CoWtr1to/n9virbYwkQwGKDwAz3VS3sfp4=
    =oMaN
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antonio Terceiro@21:1/5 to Antonio Terceiro on Fri Oct 1 13:20:02 2021
    On Thu, Sep 30, 2021 at 04:29:20PM -0300, Antonio Terceiro wrote:
    Maybe I didn't dedicate enough time for this, but I couldn't figure out
    how the pypi packages are produced from the git repository. Knowing this would help creating such typeshed package by means of some scripting
    (not necessarily volunteering, will be happy if someone beats me to it).

    It turns out that this is done by this repository:

    https://github.com/typeshed-internal/stub_uploader

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmFW7YkACgkQ/A2xu81G C95ecg//anRgbiNlbCY95eJCJLjFMhQzNCcl0nCWeSOhR1PvyIje4LCvZV3vfG/e 3XTm44vHdpbdj0f8ZvBWU5/0Go5jeoUUap/fPToWfdYVQyVIvRN2XNuD0vhF4a4T eSAfrPi6Z9nwgzXhCA6tnQq2e7LO6u07YJK55TaBUqn76GdkmecI6xeLAQHGhfKl APEzChmu5AIVSyunquDh68nEfnjjFY7U8lGyUx0sDTfFMr50iBChOeSnz2rq/DSJ Xj6xD5H1esVIKspYnaNQtESxOzxZl4EUrrTa2yEOCxexmPeLeskbiwgdwp2RQCgM JOF9G3/LzZJ3EyIt0alz9+c41bSpEjdrpkp0uTUGFm5pAAjiA7NV45YLCxQua6i8 WrcvaSUnuv/ngE7wDwgYJmgmKrdKqySK3ncEVTtb8VM7xskBwaYhDdeQw/OL8X4M N1oHc2A28trFUOwMFUylxRrhWRnuM5xm8H5kRKbrprjo9uK288UI8p5sXeprLMHp S7kDvKue8wGZIyZWphGPgMX2GtSI6qcpNyaFIdPYbB29VLgB2QmqUoHE2bVqcxga JvK3LpIE4vnz6UiPQ5lt29VIz55XBRedPWAldyB3Rk4Ve/sn1ZMPT7TsoebS0G6T PieaIe38Kh1bZjG+XI3B9M9N3gnOJDcKw5OFxQ4Jai2x2PiHPuo=
    =7hkN
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Antonio Terceiro@21:1/5 to Antonio Terceiro on Fri Oct 1 16:50:01 2021
    On Fri, Oct 01, 2021 at 08:14:20AM -0300, Antonio Terceiro wrote:
    On Thu, Sep 30, 2021 at 04:29:20PM -0300, Antonio Terceiro wrote:
    Maybe I didn't dedicate enough time for this, but I couldn't figure out
    how the pypi packages are produced from the git repository. Knowing this would help creating such typeshed package by means of some scripting
    (not necessarily volunteering, will be happy if someone beats me to it).

    It turns out that this is done by this repository:

    https://github.com/typeshed-internal/stub_uploader

    I gave this a try, and came up with
    https://salsa.debian.org/terceiro/typeshed

    This seems to work, but there are still issues to solve, e.g. the
    licensing status of the stub_uploader repository¹, and generating a
    meaningful Provides: field.

    ¹ https://github.com/typeshed-internal/stub_uploader/issues/31

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEst7mYDbECCn80PEM/A2xu81GC94FAmFXHvIACgkQ/A2xu81G C960+RAAtYgFIcJrnoi0h4QmbNedE0s3jBRzXBeAmgFO4i8oyFmjEg2dP8Iivx+f OWjFYd+UFc2UdrMGKN2gaDG8dIrocABPFBj/wUGtzEtqJsUc0vyvzfmeA8Aqted6 WyoXLSlf1qemDZrZI7PU95iZcb/QJmI0gBR4ltGL1lcSlDEShxt06OMfnuby7C9B WVKVnkFtq3VXQwJSRrRE66BbWjnta/hQP4mh80G12+fULmEDBYgqwenDra1uAbx4 syeIjX03AIUQ+ufp8HB25SUdLyuwjwcYcdj6ZLNOdyCpvFd0Gn9KuW10Y5If0EA3 CwD6xAh4iGb0/4IlJuYNEq8HcZJ8C+cs2nOqQQrc4obbDDZr8AJXDOW7HwpLR49l 99mIGef8k9bG0B0N0nK+qvOHxtuT7uJI7UAS/P7U4GvTx7O1yFc3+x4AFZkuAYIM H/zQJ7Q0Wqbq7uKJQwttFDxhWFcQpwOYOG2imEbf4wz6vy//1cD3q4Mdx+xAPAjg 0xNIey9hfozsttIAjrE7oXGGOms23hm5lTjQBJ195tXeFeE8F+TQtB0E+CSAiDyR kxhCjCxJfq2YOmY3t7q/E1GJMkHivUBlAKX3/jokM8MWzk1jb2VqLTOZxsUyQaZ6 m5tqjSta3zlfxputyM8Y7zVt8ekSiGy+dk02e62ij9wYN3iNHv4=
    =YJaK
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)