Skip to content

Update textual version to 3.3.0#520

Closed
JoeZiminski wants to merge 6 commits into
mainfrom
update_textual_3.3
Closed

Update textual version to 3.3.0#520
JoeZiminski wants to merge 6 commits into
mainfrom
update_textual_3.3

Conversation

@JoeZiminski
Copy link
Copy Markdown
Member

@JoeZiminski JoeZiminski commented Jun 3, 2025

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 to 1.0.0 in Feb #468 and we are now on version 3.3.0, I think it makes sense to continue to pin textual for the foreseeable.

The changes done to make it work were:

  1. some very minor formatting changes
  2. Rich now interprets [ 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.

@JoeZiminski JoeZiminski requested a review from cs7-shrey June 5, 2025 13:15
Copy link
Copy Markdown
Collaborator

@cs7-shrey cs7-shrey left a comment

Choose a reason for hiding this comment

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

Hey @JoeZiminski I tried it out and everything seemed normal. However, some tests were failing on my device. Here's a screenshot

Screenshot from 2025-06-08 20-20-30

I had to do 3 minor changes to fix them and all tests passed.

  1. For testing button labels, instead of using label._text[0] like here, change to just label._text, the _text probably doesn't return an array anymore.
  2. At a few places, elements are queried by pilot.app.query_one (like here) which no longer seems to work. So instead, we can use pilot.app.screen.query_one.
    (I could fix both of the above errors by a simple find and replace)
  3. 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.

@JoeZiminski JoeZiminski changed the title Update textual version. Update textual version to 3.3.0 Jun 16, 2025
@JoeZiminski
Copy link
Copy Markdown
Member Author

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 [ in the strings and so most of the additions I made here are not longer necessary. Will open a new PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants