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

Guard against breaking changes in Flynt's Python API #473

Closed
akaihola opened this issue Mar 25, 2023 · 0 comments · Fixed by #563
Closed

Guard against breaking changes in Flynt's Python API #473

akaihola opened this issue Mar 25, 2023 · 0 comments · Fixed by #563
Assignees
Labels

Comments

@akaihola
Copy link
Owner

akaihola commented Mar 25, 2023

The GitHub Action script currently allows the user to pin Darker itself to a given version using the version: option (see action/main.py).

Darker's dependencies, however, only specify minimum versions in install_requires and extras_require in setup.cfg, such as:

    black>=21.7b1
    flynt>=0.76
    isort>=5.0.1

We use internal Python APIs from each of those packages. Black doesn't even define a public Python API (yet; see psf/black#779). We use Python APIs instead of calling these tools as subprocesses for performance and flexibility reasons.

Breaking changes have occurred in the past for Black, isort and Flynt, see:

Since Darker 1.4.1, we do guard against backwards incompatible internal changes in Black and isort by running a test-future workflow weekly and also as part of push triggered builds. So we will get an early warning if it seems an incompatibility is coming up in the next Black or Flynt release. See #186 and #284 for details.

For flynt we don't currently have the same mechanism in place.

We should thus add flynt@main to be used in the test-future workflow, similar to what was done for isort in #296.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

1 participant