Skip to content

mypy 0.990 fails self test using Debian Python 3.10.8 #14037

Closed

Description

@mr-c

Bug Report

(A clear and concise description of what the bug is.)

To Reproduce

Check out the v0.990 tag and run ./runtests.py

Expected Behavior

The self tests pass
Actual Behavior

$ ./runtests.py 
run self: ['/usr/bin/python3', '-m', 'mypy', '--config-file', 'mypy_self_check.ini', '-p', 'mypy']
mypy/fastparse.py:1047: error: If condition is always false  [redundant-expr]
                        a, kd, ARG_NAMED if kd is None else ARG_NAMED_OPT, no_type_check
                                            ^~~~~~~~~~
Found 1 error in 1 file (checked 167 source files)

FAILED: self

Your Environment

$ /usr/bin/python3 -V
Python 3.10.8
  • Mypy version used: 0.990
  • Mypy command-line flags:
  • Mypy configuration options from mypy.ini (and other config files):
  • Python version used: 3.10.8

Activity

  1. added
    bugmypy got something wrong
    on Nov 8, 2022
  2. AlexWaygood commented on Nov 8, 2022

    @AlexWaygood
    Member

    What version of types-typed-ast do you have installed in your environment?

  3. AlexWaygood commented on Nov 8, 2022

    @AlexWaygood
    Member

    If you have types-typed-ast<1.5.8 installed locally, you'll need to run pip install -r test-requirements.txt again locally. It's now pinned to >=1.5.8 in CI:

    types-typed-ast>=1.5.8,<1.6.0

  4. mr-c commented on Nov 8, 2022

    @mr-c
    ContributorAuthor

    Thanks @AlexWaygood
    This is in the context of updating the mypy package for Debian, so we get types-typed-ast from a package we call python3-typeshed which is built from a 2022-06-10 snapshot of https://github.com/python/typeshed/tree/ad48606a0d901d907f2428917d7a5f97959b4733

    I'll see about updating the python3-typeshed package in Debian to something newer

  5. AlexWaygood commented on Nov 8, 2022

    @AlexWaygood
    Member

    In order for mypy selftest to pass, it'll need to be a copy of typeshed with python/typeshed@c72c9a6 (a commit on August 29) included 🙂

  6. mr-c commented on Nov 8, 2022

    @mr-c
    ContributorAuthor

    That worked, thank you @AlexWaygood !

  7. AlexWaygood commented on Nov 8, 2022

    @AlexWaygood
    Member

    Great to hear!

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