-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Regression in 3.12.5 causing non-deterministic failures in Black #123821
Comments
Also cc @JelleZijlstra |
Repro that doesn't depend on Black:
On Mac I can reproduce the error^ on ff3bc82 (v3.12.5) and a9daa4f, but on Linux repro is much rarer (I think I did get one, but maybe I've confused myself) |
Okay, was getting some confusing bisect results, but I think this is fixed on latest 3.12 by #123265 |
Fixes psf#4446 See python/cpython#123821 It's possible this is too strict? We could instead do this anytime the AST safety check fails, but feels weird to have that happen non-deterministically
Fixes #4446 See python/cpython#123821 It's possible this is too strict? We could instead do this anytime the AST safety check fails, but feels weird to have that happen non-deterministically
I'm a bit confused. That should not be able to affect black at all. It's just initializing the tokeniser structure consistently with zeros |
The bug affected Black's AST safety check, which parses the code before and after formatting to see if it's the same. So if the uninitialized memory in the tokenizer got used somehow, it's plausible that it could affect Black. I'd also expect other code that does |
Ahhhhh, I misunderstood that this PR was the regression instead that this PR was the fix! |
Man time to setup a valgrind Buildbot 👀 |
…567) * exclude python 3.12.5, which contains a regression that breaks black python/cpython#123821 * fix merge conflict * refresh poetry lock file * refresh poetry lock file after rebase
Bug report
Bug description:
#122063 causes Black to fail non-deterministically.
To reproduce:
You now non-deterministically get:
Note I think you need a non-debug build and probably a Mac
cc @pablogsal
CPython versions tested on:
3.12
The text was updated successfully, but these errors were encountered: