Release 22.1.0: segfaults and runtime type violations due to mypyc #2846
Labels
C: packaging
Installation and packaging of Black
help wanted
Extra attention is needed
T: bug
Something isn't working
Hello,
If you landed here because you either got a segmentation fault or a type violation along the lines of "TypeError: set object expected; got SomeOtherType" you're in the right place. Firstly my apologies for the issues you're hitting! Secondly, these issues are (almost 100% likely to be) directly related to mypyc which we use to compile Black into fast C extensions starting with release 22.1.0. This means a temporary fix will be to install Black from source skipping the compiled wheels, you can pass
--no-binary black
to your pip install invocation for this.Please report any issues here. Thanks!
Known issues:
TypeError: set object expected; got list
#2829 <-- note this is an unavoidable downside of mypyc, it requires strict enforcement of type at runtime or else there would be memory safety issues, the only way to workaround this is loosening the types of involved APIsIn particular if you're hitting the last issue, note that this usually stems of misuse of our informal / unofficial APIs (which is not supported usecase at the moment). We understand that using Black as library is useful and common enough, but solving this properly will require solving GH-779. Please chime in with your needs so when we do get around to drafting up a stable API, we'll take it into account.
If you'd like to help out, here's some things you can do:
Also please don't forget to either attach a fully reproducible example or at least your environment details, so CPython version, OS, architecture etc.
~ thank you!
The text was updated successfully, but these errors were encountered: