-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Split preview into --preview
and --unstable
?
#4093
Comments
I'd love the "rules" to go a step further and follow something like this:
Ie, more of a "features land to preview when they're widely agreed upon and proven, and later land to stable on the next year's release". Whether or not that is a meaningful semantic difference for black's development/release cycle, I'm not sure, but I like the idea that For large codebases like Meta's, I would also love the ability to selectively enable individual preview features when running black via its API, so that we could evaluate each one separate from the context of other style changes, but without necessarily exposing CLI flags that people will expect to rely on. As is, running with |
Thanks! I think the amount of feedback we get on the preview style is low enough that it doesn't make sense to move features into the lower "unstable" tier by default, so I'd prefer to keep moving new features into "preview" first. I do try to be quite careful before merging even a preview feature into main.
You can probably hack this together by subclassing
What's in 24.1a1 should match what is expected to be in the new stable style (though, of course, still subject to change). |
I think something like this is important and I would have loved for it to be around in 2023. However, one big problem is if we move features from The only real solution I see here is to bite the bullet and add Some semantics:
|
Black's
--preview
mode is supposed to give a preview of what next year's stable style will look like. But for the last few years, it hasn't been able to do that job, because--preview
includes experimental string processing, which produces numerous bugs and likely again won't make it into the 2024 stable style (#4042). Several other current preview features likely won't make it into the 2024 stable style.I propose to add a new style,
--unstable
. The idea would be that--preview
is only for new style features that we currently think would make it into next year's stable style, and--unstable
is for new features that we would like to eventually stabilize, but that are currently still buggy.--unstable
would include all--preview
features. This way,--preview
will truly be a preview.Concrete rules:
--unstable
until the issue is fixed.--unstable
, so that there is enough time for the ecosystem to try out the new feature. We can make exceptions for sufficiently simple and uncontroversial changes. We'd move these features into--preview
once the new year starts.Alternative solutions considered:
--preview
, but not add a separate--unstable
flag. Instead, we could add a private flag like-X string_processing
to enable individual preview features. This would allow more targeted testing, but it opens the door to more configurability than I'd like, and might lead to users expecting us to continue supporting such fine-grained configuration control.The text was updated successfully, but these errors were encountered: