-
Notifications
You must be signed in to change notification settings - Fork 33
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
Replace types-attrs with attrs #54
Conversation
We already install types-attrs. I think the bug is a cache bug, so it won't repro in mypy_primer (which only does from scratch checking). Or at least, I wasn't able to repro with |
It might be worth removing the |
🤦🏻 I should have looked more carefully. I just assumed that it wasn't installed since I was able to crash mypy with just
It is a cache bug but one that occurs on the first write / serialize. I'm able to reproduce it with
Will do that. |
attrs
for home-assistant/core
It looks like there are several projects that use types-attrs instead of attrs, want to upgrade all of them? |
Does it make sense to look for ways to remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this looks good!
Good question. primer sets both --no-incremental
and --cache-dir=/dev/null
. I guess we could set some --cache-dir
, we might just want to ensure that all the different concurrent mypys write to different caches. The cost of dropping --cache-dir=/dev/null
is basically figuring that out, some extra CI slowness, and some personal dev workflows that I can adjust.
I do confess to being surprised at the existence of an issue this would have caught that wasn't caught by the regular mypy self check. So updating my priors, but still don't think it's critical if we don't do it :-)
I've opened a PR to run serialize even with |
Currently, `mypy_primer` sets `--cache-dir=/dev/null` which disables cache generation. This can result in errors being missed which would normally come up during `tree.serialize()`. Removing `--cache-dir=/dev/null` isn't practical. This PR adds a new debug / test option `--debug-serialize` which runs `tree.serialize()` even if cache generation is disabled to help detect serialize errors earlier. **Refs** * #14137 * hauntsaninja/mypy_primer#54 (review) cc: @hauntsaninja
Blocked by python/mypy#14137