• 
      

    Improve the default summaries and logic for licenses.

    Review Request #14508 — Created July 15, 2025 and submitted

    Information

    Review Board
    release-7.1.x

    Reviewers

    The default summaries for a license are now computed in
    LicenseInfo.get_summary(), and now state information such as the
    number of days left in a trial or a grace period. The plan name is no
    longer wrapped in parentheses by default, but License Providers can
    override LicenseInfo.format_plan_name() to set this however they need.

    The default summary-building makes use of strings stored in a map, which
    helps keep the strings maintainable and avoids a bunch of nested logic.
    This is purely internal as a helper.

    There are a few other small fixes for typos and types, and
    LicenseInfo.__repr__() has been added.

    Unit tests pass.

    Verified the different states on the Licenses page.

    Made use of the summary in the Power Pack work.

    Summary ID
    Improve the default summaries and logic for licenses.
    The default summaries for a license are now computed in `LicenseInfo.get_summary()`, and now state information such as the number of days left in a trial or a grace period. The plan name is no longer wrapped in parentheses by default, but License Providers can override `LicenseInfo.format_plan_name()` to set this however they need. The default summary-building makes use of strings stored in a map, which helps keep the strings maintainable and avoids a bunch of nested logic. This is purely internal as a helper. There are a few other small fixes for typos and types, and `LicenseInfo.__repr__()` has been added.
    502ac6bf41f3d50a27a2d86866f636e1c19cfd82
    Description From Last Updated

    'typing_extensions.TypeAlias' imported but unused Column: 5 Error code: F401

    reviewbot reviewbot

    'os.unlink' imported but unused Column: 1 Error code: F401

    reviewbot reviewbot

    Should this be object or Any?

    david david
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    chipx86
    maubin
    1. Ship It!
    2. 
        
    david
    1. 
        
    2. reviewboard/licensing/license.py (Diff revision 3)
       
       
      Show all issues

      Should this be object or Any?

      1. For format, either would be fine. It accepts Any. I've generally seen that collapsing to object is a good move when possible so that you opt back into type checking for that variable (since Any basically opts out). In this case, it doesn't matter so much, but since it's more specific and accepted by format(), I think it's technically the better one to use.

    3. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-7.1.x (0ea4010)