Replies: 3 comments 2 replies
-
😕 that's annoying indeed.
I guess it's a good plan then. If black's Python API is not so stable, it could also be worth adding a Github action CI job that tests darker against the black dev branch, in order to catch API changes early, before users get a broken setup. |
Beta Was this translation helpful? Give feedback.
-
Ah, good that you reminded, we actually already have that! Here's a run of that job, and it's defined in .github/workflows/test-future.yml. This was added in #284 and discussed in #186. I'll come up with the addition to documentation. |
Beta Was this translation helpful? Give feedback.
-
#382 will establish a process for guarding Darker users against incompatibilities with auto-updated Black versions, and also document recommendations to follow and explanations of how this works. |
Beta Was this translation helpful? Give feedback.
-
In conda-forge/darker-feedstock#10, we were discussing with @martinRenou whether to define a maximum version for the Black dependency in the Conda package for Darker.
@martinRenou wrote:
The thing is, Black doesn't have a stable Python API (see psf/black#779) so while we can count on its output to stay stable throughout a calendar year due to Black's new stability policy, we have no guarantees about the internal Python functions and classes we're using.
So if we say
Black<23
, the Python API might still break in22.x
.And even if we omit the upper limit, Black 25.5 might still work just fine with today's Darker, even if it gives slightly different formatting results. And that change the users can protect against by specifying
Black<23
in their own project dependencies or pipelines.Maybe it makes most sense to document that
How does that sound?
Beta Was this translation helpful? Give feedback.
All reactions