-
Notifications
You must be signed in to change notification settings - Fork 55
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
Guard users against upcoming Black incompatibilities #382
Comments
@akaihola with a point release, you mean a patch version bump, aren't you? |
Yes, I should probably change the terminology. I guess "point release" can refer to either a minor or patch version bump. Thanks! I updated the README, fixing the terminology, and actually moved the long explanation to its own section at the end, along with a couple of example scenarios. |
README now explains: Guarding against Black compatibility breakageDarker accesses some Black internals which don't belong to its public API. Darker is thus subject to becoming incompatible with future versions of Black. To protect users against such breakage, we test Darker daily against the Black main branch and strive to proactively fix any potential incompatibilities through this process. If a commit to Black main branch introduces an incompatibility with Darker, we will release a first patch version for Darker that prevents upgrading Black and a second patch version that fixes the incompatibility. A hypothetical example:
If a Black release introduces an incompatibility before the second Darker patch version that fixes it, the first Darker patch version will downgrade Black to the latest compatible version:
To be completely safe, you can pin both Darker and Black to known good versions, but this may prevent you from receiving improvements in Black. It is recommended to use the '~=' "compatible release" version specifier for Darker to ensure you have the latest version before the next major release that may cause compatibility issues. |
The process for allowing Darker users to auto-update Black but still guard them against Darker/Black incompatibilities is:
test-future.yml
workflow regularly tests Darker against the currentmain
HEAD
of BlackThis way anyone specifying
darker~=1.4
for their project, Darker would automatically update to 1.4.3 and prevent Black from updating to an incompatible version before we've released a fixed Darker 1.4.4 or 1.5.0.darker~=x.y
as the recommended way to depend on Darkertest-future.yml
workflow to point to the guidelines in this issue in case of a failureOriginally posted by @akaihola in #334 (reply in thread)
The text was updated successfully, but these errors were encountered: