-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Cannot compile Mypy with Mypyc #18107
Comments
Looks potentially related to python/typeshed#12928, which changed |
Yeah, I would pin to old types-setuptools for now If that annotation can be loosened to Sequence it definitely should be, if not it should take |
Yes, I think Sequence would be better, since the operation (building extension modules) only needs to read from the sequence, and not modify it. Am I correct in saying that I should modify the I'm preparing a PR as we speak, but I'm not sure how to verify the change because it looks like |
Thanks for voyaging across a few different projects to fix this! :-) |
python/typeshed#12958 has been merged ! |
Thank you for the prompt reviews and guidance! All I need to bring in the patch from python/typeshed#12958 to |
Never mind, the patch doesn't apply. There isn't a submodule either, it's vendored by copying the source. The fix is not obvious to me at the time of writing :) |
There is a workflow (https://github.com/python/mypy/actions/workflows/sync_typeshed.yml) that syncs typeshed into this repo. I triggered it manually just now. It should create a PR with your changes. However, your PR touched both the distutils stubs (which are part of the stdlib) and the setuptools stubs (which are a third-party package). Mypy vendors only the former. For the latter, we'll automatically upload a new package within a day to https://pypi.org/project/types-setuptools/ . I believe mypy doesn't pin that package, so once it's on PyPI, no further work should be required. |
I think I can close this, since |
Bug Report
Hi there, I'm unable to compile Mypy with Mypyc (i.e., with
MYPY_USE_MYPYC
enabled) using the standardpip install -e .
invocation – I first noticed this in pyodide/pyodide#5124 where it's breaking our CI, but it happens locally on conventional targets on a macOS device, and in CI as well: https://github.com/agriyakhetarpal/mypy/actions/runs/11692836659/job/32563074252To Reproduce
In a terminal, run the following command:
MYPY_USE_MYPYC=1 pip install -e .
Expected Behavior
The expected behaviour is that Mypy compiles with Mypyc.
Actual Behavior
I think it's a
setuptools
problem – here's an excerpt from the logs:I haven't had a chance to bisect so far. I don't see a difference between the dependencies downloaded yesterday versus those downloaded today, either.
Your Environment
MYPY_USE_MYPYC
set to1
Additional context
xref: pyodide/pyodide#5160
The text was updated successfully, but these errors were encountered: