core-workflow icon indicating copy to clipboard operation
core-workflow copied to clipboard

Add `type-refactor` label

Open erlend-aasland opened this issue 1 year ago • 7 comments

Although we discourage refactoring in general, there is sometimes a valid need for refactoring. Recent examples would be Irit's refactoring of the compiler and Mark Shannon's proposal for more readable type defs. We've historically also done (and are still doing) several test refactorings:

  • python/cpython#54781
  • python/cpython#93649
  • python/cpython#108303
  • python/cpython#123361

Currently, we use type-feature for these efforts, but it may be beneficial to be able to differentiate between (real^1) features and refactorings.

erlend-aasland avatar Dec 06 '24 11:12 erlend-aasland

Another example that recently appeared:

  • python/cpython#127787

erlend-aasland avatar Dec 10 '24 11:12 erlend-aasland

Some other examples:

  • https://github.com/python/cpython/issues/129173
  • https://github.com/python/cpython/issues/129928
  • https://github.com/python/cpython/issues/128939
  • https://github.com/python/cpython/issues/124697

There are probably more but this would at least separate what's a real feature from what's a refactorization (sometimes internal, sometimes not).

picnixz avatar Feb 10 '25 10:02 picnixz

After https://github.com/python/cpython/issues/131238, and other issues that are meant to target refactorization-only (and not really feature), I become more and more convinced that we need such label.

@ezio-melotti Are you willing to create this new label? (I don't know which color to use though so I leave it to you, but maybe some purple? (in between the issue red and the blue feature))

picnixz avatar Mar 14 '25 11:03 picnixz

Perhaps type-internal? If the goal is "to differentiate between [user-facing] features and refactorings".

AA-Turner avatar Mar 14 '25 12:03 AA-Turner

type-internal would also be interesting! because sometimes it's more of an internal thing (and we coud use it for the different Tools that we don't ship it yet)

picnixz avatar Mar 14 '25 12:03 picnixz

What other types of changes would type-internal encompass, apart from refactorings?

erlend-aasland avatar Mar 23 '25 09:03 erlend-aasland

It could be something affecting the Tools for instance. I've opened the topic-tools label and saw that there were arguments in favor and against in a previous discussion. However, what we can probably safely say, is that whatever is in Tools is roughly something internal. Now, I don't know if mixing type-bug and type-internal would make sense to others or type-internal and type-feature in that case.

Nevertheless, I would be happy if we had a way to distinguish features from refactoring because most of the time, refactoring doesn't require a what's new and refactoring can be follow-ups of bug fixes, in which case those are not backported.

picnixz avatar Mar 23 '25 09:03 picnixz

Regarding refactoring, @gpshead 👆

erlend-aasland avatar May 14 '25 20:05 erlend-aasland

+1 to this type-refactor label.

I'd define it similar to "no visible behavior change, no non-internal API changes, no ABI changes" usually involving code reorganization to ease future work. Refactorings can sometimes be safe to backport which is something a feature does not do.

I think type-internal would be less useful. It doesn't communicate purpose as well. Ex: bugfixes and features can both be entirely internal, they just happen to also have a visible behavior change.

gpshead avatar May 31 '25 01:05 gpshead

ISTM there is some support and little opposition for adding a type-refactor label. I suggest we add it and see how it fares. If it ends up being unused, we can just remove it.

erlend-aasland avatar Jun 01 '25 08:06 erlend-aasland

@ezio-melotti, would you mind adding the type-refactor label?

erlend-aasland avatar Jun 01 '25 08:06 erlend-aasland

Done: https://github.com/python/cpython/labels/type-refactor

ezio-melotti avatar Jun 01 '25 08:06 ezio-melotti

And document it at https://devguide.python.org/triage/labels/ ?

hugovk avatar Jun 01 '25 09:06 hugovk

Let's give it a week or two to see how it fares, then we can document it.

ezio-melotti avatar Jun 01 '25 22:06 ezio-melotti

Would it be possible to choose a color different from the type-feature label? still blue, but a lighter blue? maybe #43A6C6?

picnixz avatar Jun 01 '25 22:06 picnixz

I think light blue could get confused with the triaged label. How about something completely different? I don't think we have any good pink or yellow issue labels.

ZeroIntensity avatar Jun 02 '25 02:06 ZeroIntensity

Let's go for pink!

picnixz avatar Jun 02 '25 07:06 picnixz

Updated.

A

AA-Turner avatar Jun 02 '25 07:06 AA-Turner

yellow

'Awaiting ...' are all yellow.

AA-Turner avatar Jun 02 '25 07:06 AA-Turner

Let's give it a week or two to see how it fares, then we can document it.

I think it's worked well so far. I'm in favor of documenting it.

ZeroIntensity avatar Jun 24 '25 01:06 ZeroIntensity