Skip to content

mypy 0.930 does not install types #11920

Closed as not planned
Closed as not planned

Description

@berislavlopac

Bug Report

In version 0.930, mypy does not install type packages when run with --install-types.

To Reproduce

Run mypy on code that imports a library that has a separate typing package, e.g. dateutil, both with --install-types and without it.

Expected Behavior

The packages (types-python-dateutil in the example above) should be installed. With mypy 0.920 the message (when running mypy --install-types --non-interactive .) looks something like:

Installing missing stub packages:
python -m pip install types-python-dateutil

The behaviour without --install-types behaves as described in the previous section.

Actual Behavior

In version 0.930, running mypy both with and without --install-types is the same:

licensing/logic/license.py:17: error: Library stubs not installed for "dateutil" (or incompatible with Python 3.7)
licensing/logic/license.py:17: note: Hint: "python3 -m pip install types-python-dateutil"
licensing/logic/license.py:17: note: (or run "mypy --install-types" to install all missing stub packages)
licensing/logic/license.py:17: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
licensing/logic/license.py:18: error: Library stubs not installed for "dateutil.relativedelta" (or incompatible with Python 3.7)

Your Environment

  • Mypy version used: 0.930
  • Mypy command-line flags: --install-types
  • Python version used: 3.7
  • Operating system and version: Linux Ubuntu impish

Activity

  1. huyz commented on Jan 12, 2022

    @huyz

    Hmm, I thought that was happening to me too, but I tried again and it worked for me, with versions 0.930, 0.931, and 0.910

  2. berislav-harbr commented on Jan 12, 2022

    @berislav-harbr

    0.931 is working fine for me too now 🤷‍♂️

  3. huyz commented on Jan 12, 2022

    @huyz

    So close the issue?

  4. JelleZijlstra commented on Jan 12, 2022

    @JelleZijlstra
    Member

    There's a good chance this bug is dependent on the state of the cache, which might be why it no longer reproduces.

  5. hauntsaninja commented on Aug 3, 2022

    @hauntsaninja
    Collaborator

    Closing, since there isn't a repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions