Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy 0.990 fails self test using Debian Python 3.10.8 #14037

Closed
mr-c opened this issue Nov 8, 2022 · 6 comments
Closed

mypy 0.990 fails self test using Debian Python 3.10.8 #14037

mr-c opened this issue Nov 8, 2022 · 6 comments
Labels
bug mypy got something wrong

Comments

@mr-c
Copy link
Contributor

mr-c commented Nov 8, 2022

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
@mr-c mr-c added the bug mypy got something wrong label Nov 8, 2022
@AlexWaygood
Copy link
Member

AlexWaygood commented Nov 8, 2022

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

@AlexWaygood
Copy link
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

@mr-c
Copy link
Contributor Author

mr-c commented Nov 8, 2022

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

@AlexWaygood
Copy link
Member

AlexWaygood commented Nov 8, 2022

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 🙂

@mr-c
Copy link
Contributor Author

mr-c commented Nov 8, 2022

That worked, thank you @AlexWaygood !

@mr-c mr-c closed this as completed Nov 8, 2022
@AlexWaygood
Copy link
Member

Great to hear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants