Skip to content

Document MOTD transformers#1096

Merged
PerchunPak merged 13 commits intomasterfrom
document-transformers
Feb 7, 2026
Merged

Document MOTD transformers#1096
PerchunPak merged 13 commits intomasterfrom
document-transformers

Conversation

@PerchunPak
Copy link
Member

I hope my grammar is better this time, but please suggest any nitpicks. I will appreciate it

The docs for transformers are on the "MOTD parsing" page

@PerchunPak PerchunPak requested a review from ItsDrike February 2, 2026 11:57
@PerchunPak
Copy link
Member Author

I would consider making direct usage of transformers a private API, to be honest. Motd.to_x() is much more convenient, so I am not sure why would the user do something else

@ItsDrike
Copy link
Member

ItsDrike commented Feb 2, 2026

I would consider making direct usage of transformers a private API, to be honest. Motd.to_x() is much more convenient, so I am not sure why would the user do something else

Oh, this also kinda applies to the question of whether or not to do the major bump after #1094, I do personally agree that considering transformers private makes more sense. I originally even thought they were, didn't actually realize they were documented as public. I don't think there's many people using them anyways.

I'm fine with removing them from the docs.

@PerchunPak
Copy link
Member Author

I removed transformers from the docs, so we consider them private now. I think we have somewhere a policy, "if it is in the docs, it is public API. Unless it is on the Internal Data page."

@ItsDrike
Copy link
Member

ItsDrike commented Feb 3, 2026

BTW, do we consider removing transformers from public API a breaking change? This doesn't technically break any usage of them right now, but future changes might, and unless we remember not to make such changes to transformers and essentially consider them public at least until the next major release, which I'm not that confident we will, that could pose problems.

Though maybe it's enough to just leave a comment somewhere close to the top of the file about it.

Also, if we want, we could also literally deprecate direct usage of transformers, we could do this by adding a kw only, _ prefixed arg to __init__, like _used_internally: bool = False, and unless true, emit a warning.

@ItsDrike ItsDrike added a: documentation Related to project's documentation (comments, docstrings, docs) t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.) labels Feb 3, 2026
@PerchunPak
Copy link
Member Author

BTW, do we consider removing transformers from public API a breaking change?

Hmm, I like the idea of deprecating that

Copy link
Member

@ItsDrike ItsDrike left a comment

Choose a reason for hiding this comment

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

will need resolving merge conflicts too after the new deprecation handling

Copy link
Member

@ItsDrike ItsDrike left a comment

Choose a reason for hiding this comment

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

Just one minor wording detail, otherwise it can be merged

@PerchunPak PerchunPak merged commit ef1c10e into master Feb 7, 2026
10 checks passed
@PerchunPak PerchunPak deleted the document-transformers branch February 7, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: documentation Related to project's documentation (comments, docstrings, docs) t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants