Skip to content

Conversation

@SameeranB
Copy link

Fixes #12

This commit resolves the compatibility issues with Textual v5.3.0+ by:

  1. Remove deprecated imports:

    • Removed from textual.app import DEFAULT_COLORS
    • Removed from textual.design import ColorSystem
  2. Update detect_textual_colors() method:

    • Replace deprecated self.app.dark with modern theme detection
    • Use string-based theme checking: "dark" in str(self.app.theme).lower()
    • Return static color dictionary instead of using ColorSystem.generate()
  3. Version and dependency updates:

    • Bump version to 0.4.0
    • Update Textual dependency to support >=0.8.0,<6.0.0
    • Update README to mention v5.3.0+ compatibility

This provides a more robust solution than PR #11 by completely removing deprecated APIs rather than working around them. The fix has been tested with Textual v5.3.0 and maintains backward compatibility with older versions.

Fixes mitosch#12

This commit resolves the compatibility issues with Textual v5.3.0+ by:

1. **Remove deprecated imports**:
   - Removed `from textual.app import DEFAULT_COLORS`
   - Removed `from textual.design import ColorSystem`

2. **Update detect_textual_colors() method**:
   - Replace deprecated `self.app.dark` with modern theme detection
   - Use string-based theme checking: `"dark" in str(self.app.theme).lower()`
   - Return static color dictionary instead of using ColorSystem.generate()

3. **Version and dependency updates**:
   - Bump version to 0.4.0
   - Update Textual dependency to support >=0.8.0,<6.0.0
   - Update README to mention v5.3.0+ compatibility

This provides a more robust solution than PR mitosch#11 by completely removing
deprecated APIs rather than working around them. The fix has been tested
with Textual v5.3.0 and maintains backward compatibility with older versions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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.

Bug referencing deprecated DEFAULT_COLORS global

1 participant