• 
      

    Warn when deprecated options are passed to commands and improve their docs.

    Review Request #14623 — Created Sept. 25, 2025 and submitted — Latest diff uploaded

    Information

    RBTools
    release-5.x

    Reviewers

    We currently allow for rbt options to be marked as deprecated, and we'll
    display deprecation info in the documentation and help text for the option.
    But we weren’t emitting any warnings when users actually passed them on
    the command line. This change allows rbt to emit a deprecation warning
    when a deprecated option is used.

    This change also allows setting a replacement option and the version in
    which the option will be removed. Our sphinx documentation building
    functions and help text building logic have been updated to include these.

    I decided to move our RBTools-specific option attributes out of
    Option.attrs and made them direct attributes on the Option class
    instead. This keeps a clearer separation from the argparse arguments
    and lets us keep this information around after the Option is added to
    the parser (previously we would strip all of our custom attributes
    before adding an option to the parser). We also get easy typing on
    these attributes now.

    We also recently marked rbt login's --enable-logging as deprecated, and
    this change defines its replacement (--debug) and removal version (6.0).

    • Tested rbt login -l saw the deprecation warning
    • Tested rbt login with options other than -l, saw no warnings
    • Ran unit tests.
    • Built docs and looked at options that have one or more of the custom
      RBTools attributes (config key, extended help, added in and the various
      deprecation related attributes).

    Commits

    Files