Update textual version to 3.3.0#520
Conversation
cs7-shrey
left a comment
There was a problem hiding this comment.
Hey @JoeZiminski I tried it out and everything seemed normal. However, some tests were failing on my device. Here's a screenshot
I had to do 3 minor changes to fix them and all tests passed.
- For testing button labels, instead of using
label._text[0]like here, change to justlabel._text, the_textprobably doesn't return an array anymore. - At a few places, elements are queried by
pilot.app.query_one(like here) which no longer seems to work. So instead, we can usepilot.app.screen.query_one.
(I could fix both of the above errors by a simple find and replace) - Similarly, this line wasn't able to query the project manager screen, we can change it to something like
assert isinstance(self.screen, project_manager.ProjectManagerScreen)
self.screen.update_active_tab_tree()The rest of the code looks good. Also, I couldn't review the part where you added some regexes (I'm really bad at regex), I hope you'll take care of that.
|
Hey @cs7-shrey thanks a lot for this, I was relying on the CI for testing but it was pulling dependencies from conda so not actually testing the correct textual version! That will be fixed in #522 , I think the issues you have found will remain so will be very useful for fixing this, thanks! After all that, textual have released 3.4.0 which is much less strict about the |

This PR re-pins the textual version to
3.3.0, as the previous version (1.0.0) was failing tests on macOS-14 for python 3.9. This was pinned to1.0.0in Feb #468 and we are now on version3.3.0, I think it makes sense to continue to pin textual for the foreseeable.The changes done to make it work were:
[in string as markdown style syntax and will throw an error if not used in this way. A centralized function is introduced to escape all[to avoid this error.All tests passed and I manually tested all page to ensure nothing strange in rendering had occurred. No documentation necessary.