Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pekkaklarck opened this issue Aug 25, 2023 · 2 comments

Comments

@pekkaklarck
Copy link
Member

pekkaklarck commented Aug 25, 2023

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.

@pekkaklarck pekkaklarck added this to the v7.0 milestone Aug 25, 2023
@pekkaklarck pekkaklarck changed the title Remove deprecated attributes in result model making control structures look like keywords Remove deprecated attributes in result model Aug 28, 2023
@yanne yanne self-assigned this Aug 28, 2023
yanne added a commit that referenced this issue Sep 6, 2023
`datatypes` has already been deprecated in favor of `typedocs`
This commit removes the generation of `datatypes` and fixes/removes
associated tests. The schema files have been updated earlier.
Part of #4846
yanne added a commit that referenced this issue Sep 14, 2023
.keywords and .children have been deprecated since RF 4.0
.critical has also been deprecated a long time

Part of #4846
yanne added a commit that referenced this issue Sep 14, 2023
yanne added a commit that referenced this issue Sep 14, 2023
.keywords and .children have been deprecated since RF 4.0
.critical has also been deprecated a long time

Part of #4846
yanne added a commit that referenced this issue Sep 14, 2023
yanne added a commit that referenced this issue Sep 18, 2023
.keywords and .children have been deprecated since RF 4.0
.critical has also been deprecated a long time

Part of #4846
yanne added a commit that referenced this issue Sep 18, 2023
yanne pushed a commit that referenced this issue Sep 24, 2023
.keywords and .children have been deprecated since RF 4.0
.critical has also been deprecated a long time

Part of #4846
yanne pushed a commit that referenced this issue Sep 24, 2023
yanne pushed a commit that referenced this issue Sep 29, 2023
.keywords and .children have been deprecated since RF 4.0
.critical has also been deprecated a long time

Part of #4846
yanne pushed a commit that referenced this issue Sep 29, 2023
yanne pushed a commit that referenced this issue Oct 3, 2023
.keywords and .children have been deprecated since RF 4.0
.critical has also been deprecated a long time

Part of #4846
yanne pushed a commit that referenced this issue Oct 3, 2023
yanne pushed a commit that referenced this issue Oct 3, 2023
.keywords and .children have been deprecated since RF 4.0
.critical has also been deprecated a long time

Part of #4846
yanne pushed a commit that referenced this issue Oct 3, 2023
@pekkaklarck pekkaklarck changed the title Remove deprecated attributes in result model Result model: Loudly deprecate not needed attributes and remove already deprecated ones Oct 4, 2023
pekkaklarck added a commit that referenced this issue Oct 4, 2023
Fixes #4883. Doc is now deprecated as part of #4846, but it will be
removed in the future.
@pekkaklarck
Copy link
Member Author

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.

@pekkaklarck
Copy link
Member Author

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.

pekkaklarck added a commit that referenced this issue Nov 9, 2023
- Enhance the deprecation warning.
- Deprecate also `doc`.
- Enhance tests.

Missing part of #4846.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants