Skip to content

Result model: Loudly deprecate not needed attributes and remove already deprecated ones #4846

Closed

Description

@pekkaklarck

The result model (robot.result.TestSuite) got separate objects for representing control structures (For, If, ...) only in RF 4.0 (#3749). Before that control structures were modeled as keywords with a type attribute telling what they actually represent. For backwards compatibility the new objects got keywords specific attributes like name. These attributes were deprecated from the beginning and it's not finally time to remove them.

This change will require changing our log file generation code, because it handles control structures as keywords, but that's not too big a problem. The change obviously affects all external tools handling control structures as keywords as well making the change backwards incompatible. We couldn't do it in a bug fix or even in a feature release, but doing it in a major release ought to be fine.


UPDATE: It turned out that we hadn't properly deprecated all the attributes. Some only used our custom @deprecated decorator, but the decorator didn't do anything. Instead of removing these attributes, we decided to change the decorator so that now there's an actual deprecation warning. Those attributes that already emitted deprecation warnings were removed.

Activity

  1. added this to the v7.0 milestone on Aug 25, 2023
  2. changed the title [-]Remove deprecated attributes in result model making control structures look like keywords[/-] [+]Remove deprecated attributes in result model[/+] on Aug 28, 2023
  3. self-assigned this
    on Aug 28, 2023
  4. added a commit that references this issue on Sep 6, 2023
  5. 2 remaining items

  6. changed the title [-]Remove deprecated attributes in result model[/-] [+]Result model: Loudly deprecate not needed attributes and remove already deprecated ones[/+] on Oct 4, 2023
  7. pekkaklarck commented on Nov 8, 2023

    @pekkaklarck
    MemberAuthor

    The following attributes were removed from the result model. They all had been deprecated since RF 4.0.

    • TestCase.keywords. Use TestCase.body, TestCase.setup and TestCase.teardown instead.
    • TestSuite.keywords. Use TestSuite.setup and TestSuite.teardown instead.
    • Keyword.keywords. Use Keyword.body and Keyword.teardown instead.
    • Keyword.children. Use Keyword.body instead.
    • TestCase.critical. The whole criticality concept has been removed.

    TestCase.keywords and TestSuite.keywords were also present in the execution model and removed from there as well.

  8. pekkaklarck commented on Nov 9, 2023

    @pekkaklarck
    MemberAuthor

    Control structures were earlier masked to look like keywords. Nowadays they are considered totally different and their attributes name, kwnane, libname, doc, args, assign, tags and timeout have been "loudly" deprecated.

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions