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

Define a stability policy #2529

Merged
merged 4 commits into from Oct 21, 2021
Merged

Define a stability policy #2529

merged 4 commits into from Oct 21, 2021

Conversation

JelleZijlstra
Copy link
Collaborator

Fixes #2394. Eventually fixes #517.

This is essentially @pradyunsg's suggestion from #2394. I suggest that at the
same time we start the formal stability policy, we take a few other disruptive steps
and drop Python 2 and the "b" marker.

Copy link
Collaborator

@felix-hilden felix-hilden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cogs are turning and it's exciting! 😄 As discussed, the policy is sensible. And having a CLI flag instead of, say two branches with different release lines seems more manageable.

Copy link
Contributor

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions inline, and a overall note.

Define this stability policy as something that applies to the stable releases, not all releases. I would also recommend against making any formatting changes when this policy is adopted -- it would be a good idea to have a beta release prior to the stable release, that contains any potentially disruptive changes. IMO your last beta release and first stable release only have one difference -- the version number -- that's how you know it's good enough to call stable. :)

While dropping Python 2 is -- as you'd know -- something I strongly recommend doing, I do recommend separating that from the discussion of adopting this policy. :)

CHANGES.md Outdated Show resolved Hide resolved
docs/faq.md Outdated Show resolved Hide resolved
docs/faq.md Outdated Show resolved Hide resolved
docs/the_black_code_style/index.rst Outdated Show resolved Hide resolved
docs/the_black_code_style/index.rst Outdated Show resolved Hide resolved
@ichard26
Copy link
Collaborator

ichard26 commented Oct 7, 2021

While dropping Python 2 is -- as you'd know -- something I strongly recommend doing, I do recommend separating that from the discussion of adopting this policy. :)

Strong +1 from me as these things aren't closely connected other than that they may be done at the same time.

re. making the first stable release basically a version bump dropping the B (too lazy to copy and paste :p)

I don't feel as strongly as you but this seems like a good idea.

Thank you for the review @pradyunsg, it's well appreciated :)

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Oct 11, 2021

What's the status on parsing Python 3.10? Depending on the details, I suspect it might be a lot more work than otherwise to actually keep this guarantee through swapping out parsers.

As pradyunsg says elsewhere:

If you cut the stable release in Feb 2022 or April 2022, nothing is going to break. Give yourselves the flexibility to do things at whatever pace, instead of promising deadlines to largely ambivalent users.

@JelleZijlstra
Copy link
Collaborator Author

What's the status on parsing Python 3.10? Depending on the details, I suspect it might be a lot more work than otherwise to actually keep this guarantee through swapping out parsers.

There's been no real progress. Most likely it will be a big rewrite, so you're right that that may make it hard to guarantee no format changes.

@hauntsaninja
Copy link
Collaborator

hauntsaninja commented Oct 11, 2021

Okay, if it's going to be a big rewrite then I see the two options as:
a) postpone stability policy until after rewrite,
b) add stability policy, only use newly rewritten code with black --future (i.e. users need a flag to format match statements), keep all existing code around until 2023.

There is of course a third option, but one I'm skeptical of:
c) add stability policy, delete existing code, assume big rewrite results in no formatting changes / treat every formatting change it introduces as a bug that surprises users who now expect stability

My preference would be for a). It might be the case that I'm pessimistic about c), but the only way to find out for sure would be to make progress on the rewrite.

JelleZijlstra and others added 3 commits October 21, 2021 16:57
Fixes #2394. Eventually fixes #517.

This is essentially @pradyunsg's suggestion from #2394. I suggest that at the
same time we start the formal stability policy, we take a few other disruptive steps
and drop Python 2 and the "b" marker.
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
@ambv ambv merged commit c75abed into main Oct 21, 2021
@ambv ambv deleted the stability branch October 21, 2021 15:02
@ambv
Copy link
Collaborator

ambv commented Oct 21, 2021

We can do further improvements on this going forward. Thanks!

@lig lig mentioned this pull request Oct 21, 2021
@hugovk hugovk mentioned this pull request Oct 22, 2021
1 task
JelleZijlstra added a commit that referenced this pull request Nov 16, 2021
Fixes #2394. Eventually fixes #517.

This is essentially @pradyunsg's suggestion from #2394. I suggest that at the
same time we start the formal stability policy, we take a few other disruptive steps
and drop Python 2 and the "b" marker.

Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
@ichard26
Copy link
Collaborator

ichard26 commented Jan 14, 2022

re. Python 3.10 rewrite

We're in a slightly better state as the great work by @isidentical means Black (or specifically blib2to3) supports 3.10 pretty well at this point. We still have the fact the parser is still LL(1) and now has a somewhat permissive grammar meaning we'd have to rewrite the project eventually if Python gets even more new PEG syntax in future releases. This gives us more time and less pressure but then again the whole problem is the complete lack of resources as per usual in FOSS :/

It's probably worth fleshing out a basic transition plan after we finally get Black stable, but to be honest I have no idea where we'd start.

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

Successfully merging this pull request may close these issues.

Define a stability policy Non-prerelease black release
6 participants