Skip to content

Conversation

tleonhardt
Copy link
Member

@tleonhardt tleonhardt commented Oct 4, 2025

Revert CompletionItem.description field to original name, but expand type from str to str | Sequence[Any].

I attempted to migrate a large cmd2 application from version 2.7.0 to 3.0.0rc1 and spent 10 hours on the effort and still wasn't done. The numerous backwards incompatibilities make it more difficult for users than it could be.

This is one small attempt to start in the direction of reducing some of the more painful backwards incompatibilities.

This is a concept I'm not fully sold on. I'm just looking for ways to simplify the process of upgrading by reducing backwards incompatibilities.

Restores the `CompletionItem.description` field and expands its type to work with either `str` or `Sequence[str | rich.Column]`.

This reverts a breaking change introduced in 3.0.0 and makes it easier for users to migrate from version 2.7.0.
Copy link
Contributor

github-actions bot commented Oct 4, 2025

🤖 Hi @tleonhardt, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

Copy link

codecov bot commented Oct 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.90%. Comparing base (665ab52) to head (4bb80ba).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1528   +/-   ##
=======================================
  Coverage   98.90%   98.90%           
=======================================
  Files          21       21           
  Lines        4933     4935    +2     
=======================================
+ Hits         4879     4881    +2     
  Misses         54       54           
Flag Coverage Δ
unittests 98.90% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

📋 Review Summary

This pull request reverts a breaking change by renaming CompletionItem.descriptive_data back to CompletionItem.description and expanding its type hint to str | Sequence[Any] for improved backward compatibility. The changes are well-implemented, and the related documentation and tests have been updated accordingly.

🔍 General Feedback

  • The code is clear, and the change effectively addresses the backward compatibility issue.
  • The updates to the changelog and tests are accurate and appreciated.

Improve docstring to make it more accurate

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@tleonhardt tleonhardt changed the title Make backwards compatibility slightly easier [DRAFT] Make backwards compatibility slightly easier Oct 8, 2025
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.

1 participant