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

Release 22.1.0: segfaults and runtime type violations due to mypyc #2846

Closed
ichard26 opened this issue Jan 31, 2022 · 2 comments
Closed

Release 22.1.0: segfaults and runtime type violations due to mypyc #2846

ichard26 opened this issue Jan 31, 2022 · 2 comments
Labels
C: packaging Installation and packaging of Black help wanted Extra attention is needed T: bug Something isn't working

Comments

@ichard26
Copy link
Collaborator

ichard26 commented Jan 31, 2022

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:

In 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:

  • It would be helpful to get a full stack trace. Is the crash reproducible in gdb?
  • Try to figure out which code in Black is triggering the crash
  • What compiler or build options are required? is the crash only reproducible under a debug CPython build?

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!

@ichard26 ichard26 added T: bug Something isn't working help wanted Extra attention is needed C: packaging Installation and packaging of Black labels Jan 31, 2022
@ichard26 ichard26 pinned this issue Jan 31, 2022
@ichard26 ichard26 unpinned this issue Aug 21, 2022
@ngoldbaum
Copy link
Contributor

ngoldbaum commented Dec 7, 2022

In case anyone else was confused, the pip invocation you need to install black with is pip install --no-binary black black.

@hauntsaninja
Copy link
Collaborator

Closing since all known issues have been taken care of! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: packaging Installation and packaging of Black help wanted Extra attention is needed T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants