[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Types and builds for mypy
From: |
Maxim Cournoyer |
Subject: |
Re: Types and builds for mypy |
Date: |
Sat, 22 Oct 2022 09:53:04 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Hi,
Philip Beadling <phil@beadling.co.uk> writes:
> Hi all
>
> Users of mypy and python will have noticed since the promotion of mypy to v0.
> 971 it is now neccesary to provide separate python packages containing types
> of non core libraries.
>
> The way we've been collecting these, outside of Guix proper, is in a single
> module called python-types, which can then simply be added as a native-input
> to any python build requiring mypy.
>
> The alternative is to colocate the types with their packages, or perhaps
> colocate them all with mypy itself.
Is MyPy the only consumer of Python type annotations? I think so, but
I'm not sure. If it's the only one, it'd make sense to move mypy and
all the annotation types to (gnu packages python-types), I think.
> My preference is to put them all in one module, I think.
>
> Is there formal strategy in Guix for how to organise these packages? I'd be
> happy to make available our current python-types.scm as a starting point?
>
> Finally and slightly related I note that by default the 971 package of
> mypy is not C compiled using mypyc. It's a simple tweak to turn this
> on in the package and it makes huge performance difference when using
> mypy (on average 4x faster is quoted). Again, happy to offer up a
> modified or inherited package if other people are frustrated by the
> slow down?
I think if it doesn't negatively impact its use, we should go ahead and
make this change in the mypy package.
Happy to review patches!
--
Thanks,
Maxim