You are not logged in.

#1 2018-05-07 11:31:50

Valryne
Member
Registered: 2018-05-07
Posts: 2

mypy stopped working after migration from AUR to community [Fixed]

Hello,

The mypy package and its dependency python-typed-ast were recently added to the community repos.

Since then, I get error-messages like these:

error: Cannot find 'builtins' module. Typeshed appears broken!
error: No library stub file for standard library module 'math'
note: (Stub files are from https://github.com/python/typeshed)
error: No library stub file for standard library module 'typing'

At https://github.com/python/typeshed, it says:

If you're just using mypy (or pytype or PyCharm), as opposed to developing it, you don't need to interact with the typeshed repo at all: a copy of typeshed is bundled with mypy.

But amongst the files listed to be contained in the mypy-package, there is no hint to typeshed being included in the package.

Since mypy worked fine before the migration to community, I wonder wether leaving out typeshed is intentional – if so, I will try to find a workaround using the github repositories; if not, I wonder wether this is worth filing a bug-report.

Last edited by Valryne (2018-05-07 18:01:48)

Offline

#2 2018-05-07 11:44:31

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: mypy stopped working after migration from AUR to community [Fixed]

Looking at mypy's PKGBUILD, it doesn't seem to be doing anything w.r.t. typeshed, so I presume it is WAI. Maybe the AUR package was doing something special.

https://git.archlinux.org/svntogit/comm … a77059b7a2

Offline

#3 2018-05-07 12:40:56

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: mypy stopped working after migration from AUR to community [Fixed]

This seems to be a bug. typeshed is a submodule in the mypy git repository and is not included in the archive download. Archives for submodules have to be downloaded separately I think.
-> https://github.com/python/typeshed/arch … 0f96b2.zip

The AUR package was built from the sources hosted on pypi.org, which already include typeshed.
https://aur.archlinux.org/cgit/aur.git/ … ILD?h=mypy

Last edited by progandy (2018-05-07 12:41:50)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2018-05-07 13:06:29

Valryne
Member
Registered: 2018-05-07
Posts: 2

Re: mypy stopped working after migration from AUR to community [Fixed]

Thanks.

As I could not figure out how to add typeshed from the github-repo to the installed mypy-package, I just removed the community package and installed mypy from the git-repo using the commands in the PKGBUILD you linked.

If I just git clone the repo, I get the same errors as with the community package.

However, the mypy-README states that:

When you use a checked-out clone of the mypy repo, a copy of typeshed should be included as a submodule, using

$ git clone --recurse-submodules https://github.com/python/mypy.git

And if I clone the repo including its submodules before building with the PKGBUILD commands, everything works fine again.

If it is possible to use a flag like --recurse-submodules in the PKBUILD, this should be easy to fix.

Offline

#5 2018-05-07 13:08:35

progandy
Member
Registered: 2012-05-17
Posts: 5,190

Re: mypy stopped working after migration from AUR to community [Fixed]


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB