Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Deprecate tostring_rgb.#25484
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Deprecate tostring_rgb.#25484
Uh oh!
There was an error while loading.Please reload this page.
Conversation
As noted previously, silently dropping alpha can be confusing. Also,directly accessing the buffer array is more efficient (it does notinvolve copying to a string buffer) and should cover most use cases.
@@ -414,6 +415,7 @@ def get_renderer(self, cleared=False): | |||
self.renderer.clear() | |||
return self.renderer | |||
@_api.deprecated("3.8") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do we need any of these tostring_ methods? and even if we do, should they not be private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We could also deprecate tostring_argb (which we don't use either anymore); I don't have a strong opinion here.
As noted previously (#5336, see in particular the comments in the thread), silently dropping alpha can be confusing. Also, directly accessing the buffer array is more efficient (it does not involve copying to a string buffer) and should cover most use cases.
Closes#5336.
PR Summary
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst