You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression in mypy 0.930: Cannot override writable attribute "__module__" with a final one #11820
The commit made it in, but I don't think it actually fixed the issue (as also evidenced by the lack of a primer diff on that PR). I can still repro on both master and 0.931, cc @sobolevn
Activity
sobolevn commentedon Dec 22, 2021
Thanks! Fix is on its way. You can add
# type: ignorefor now.dvarrazzo commentedon Dec 22, 2021
I'm afraid it will have to be "mypy != 0.930" because there are too many of them and because psycopg is also affected by python/typeshed#6661 😄
https://github.com/psycopg/psycopg/runs/4610348714?check_suite_focus=true
hauntsaninja commentedon Dec 22, 2021
I'll add pyscopg to mypy_primer, so hopefully you'll have fewer regressions in the future :-)
Avoid mypy version 0.930
dvarrazzo commentedon Dec 22, 2021
@hauntsaninja amazing, thank you! And thank you all for the quick turnaround!
Avoid mypy version 0.930
Fixes regression with `__module__` and similar non-final `Enum` names…
Fixes regression with `__module__` and similar non-final `Enum` names…
dvarrazzo commentedon Jan 7, 2022
This seems still open in mypy 0.931. In which release is the fix due?
https://github.com/psycopg/psycopg/runs/4741795872?check_suite_focus=true
Exclude mypy 0.931 too from tests
Exclude mypy 0.931 too from tests
hauntsaninja commentedon Jan 7, 2022
The commit made it in, but I don't think it actually fixed the issue (as also evidenced by the lack of a primer diff on that PR). I can still repro on both master and 0.931, cc @sobolevn
sobolevn commentedon Jan 9, 2022
I am so sorry 🤦
I've literally confused
andandoroperations.Tests didn't catch this, because in tests
__module__is not defined onobject.Now it should be fine! I've double checked it locally.
dvarrazzo commentedon Jan 9, 2022
No worries, @sobolevn: your work is very appreciated 🙂
Fix `Enum` final props and writable special members, refs #11820 (#11945
Fixes regression with `__module__` and similar non-final `Enum` names…
Fix `Enum` final props and writable special members, refs python#11820 (