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

Remove black while support is maintained for python 2.7 #873

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

ddrthall
Copy link
Contributor

@ddrthall ddrthall commented Dec 4, 2024

What does this PR do?

Remove the black tox command.
Force the mypy tox env to one that is supported.

Description of the Change

Python 2.7 support is being retired in a number of the utilities we're using to perform code verification. Black, a python formatter, is currently unsafe to run for python < 3.3 and therefore the ability to do so is being disabled while python 2.7 is still under support for this repo.
MyPy is currently version locked to support 2.7 static analysis, and fails to run successfully on python > 3.8. As such, it is defaulted to 3.8, the latest stable version that, at the time of writing, also boasts the most extensive pipeline support for the repo.

Alternate Designs

Possible Drawbacks

We want a formatter for the project, so disabling black is not the solution we ultimately wish to run with. While it might be possible to isolate a specific older version of black that 1) won't break support for 2.7 and 2) won't recommend unideal format changes for 3.12, such a solution would be brittle and increasingly unlikely to work as new python versions get released. We've already disabled the black run in the pipeline and don't seem to be running it locally, so a total removal was judged as more sensible while support for 2.7 remains.

Verification Process

None, no code changed.

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@ddrthall ddrthall added the changelog/no-changelog Changes don't appear in changelog label Dec 4, 2024
@ddrthall ddrthall marked this pull request as ready for review December 4, 2024 20:15
@ddrthall ddrthall requested a review from a team as a code owner December 4, 2024 20:15
@ddrthall ddrthall merged commit d375ea0 into master Dec 11, 2024
16 checks passed
@ddrthall ddrthall deleted the ryan.hall/environment-fixes branch December 11, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog Changes don't appear in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants