Pylons / pyramid

Pyramid - A Python web framework
https://trypyramid.com/
Other
3.97k stars 887 forks source link

Add version constraints to black, flake8, and isort #3690

Closed luhn closed 2 years ago

luhn commented 2 years ago

3689 got me thinking that formatting/linting should be stable, PRs shouldn't be required to reformat the entire project to get the tests to pass. This PR adds version constraints to the black, flake8, and isort to produce stable results, according their release policies:

luhn commented 2 years ago

I'm not sure I agree with bumping versions on release. Bumping versions might cause any number of source changes, I don't think we should be messing with the codebase immediately prior to releasing.

stevepiercy commented 2 years ago

Yeah, I'm not sure how we can set a reminder to check whether to check to do a version bump of tools. Usually that happens only when builds fail, but if we pin these tools, then the builds will not fail due to changes in these tools. How and when should we remember to check for the latest versions?

luhn commented 2 years ago

I made the version constraints as loose as possible, so to a limited degree updates will be automatic.

I also think it's okay if we're a bit out of date. It doesn't matter too much if we're using the latest and greatest formatting tools, as long as everybody is on the same version and getting the same results.

If you do really think we need a policy for updating, maybe we update the version for alpha and beta builds only?

Otherwise we'd probably just updated when motivated by support for new language features or Python version/platform/etc compatibility.

mmerickel commented 2 years ago

I don't think we need a policy on this. It's just formatting/linting and can be run whenever. This LGTM.

luhn commented 2 years ago

Black is now stable! Updated PR accordingly.

digitalresistor commented 2 years ago

I just merged a different PR that changes the versions we support, but also fixes the pypy issue, if you could merge master or rebase on top of master, so CI can run that would be great!

luhn commented 2 years ago

Alright, rebased.

digitalresistor commented 2 years ago

Thank you!