-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Future-proof Chart against changing Toga Widget initialization #194
base: main
Are you sure you want to change the base?
Future-proof Chart against changing Toga Widget initialization #194
Conversation
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.
Agreed this makes sense in the light of beeware/toga#2942 changes; one possible way to avoid the backwards incompatibility at all, plus any additional changes that are needed as a result of the final review state of beeware/toga#2942.
src/toga_chart/chart.py
Outdated
if not self._impl: | ||
# Backwards compatibility for Toga 0.4.8, which does not call the _create() | ||
# method in Widget.__init__() | ||
self._create() |
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 can also fix this by a toga dependency to toga-core>=0.4.8
. It's an interesting omission that we don't currently have that dependency, only enforcing the toga-dummy
requirement on developers.
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.
Oh. Yeah. That is a good point! I'll just change it to that once we know for sure what the next version number is.
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.
I've removed the backwards compatibility shim and added the version requirement (which fails for now, of course, since Toga 0.5.0 doesn't exist).
Updates Chart to play nice with the restructured Widget initialization in beeware/toga#2942, while staying backwards compatibile with Toga 0.4.8.
I realize that PR may or may not change significantly before merging; this is for its current form as of beeware/toga@c4db37f, and I can amend as needed.
PR Checklist: