Skip to content

Commit

Permalink
Fix version numbers in docs and in a warning. Fixes #4525.
Browse files Browse the repository at this point in the history
  • Loading branch information
pekkaklarck committed Oct 31, 2022
1 parent 628b44b commit a5b698d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion atest/robot/tags/-tag_syntax.robot
Expand Up @@ -31,6 +31,6 @@ Check Deprecation Warning
[Arguments] ${index} ${source} ${lineno} ${tag}
Error in file ${index} ${source} ${lineno}
... Settings tags starting with a hyphen using the '[Tags]' setting is deprecated.
... In Robot Framework 5.2 this syntax will be used for removing tags.
... In Robot Framework 6.1 this syntax will be used for removing tags.
... Escape '${tag}' like '\\${tag}' to use the literal value and to avoid this warning.
... level=WARN pattern=False
6 changes: 3 additions & 3 deletions doc/userguide/src/CreatingTestData/CreatingTestCases.rst
Expand Up @@ -677,10 +677,10 @@ using two different settings:

Both of these settings still work, but they are considered deprecated.
A visible deprecation warning will be added in the future, most likely
in Robot Framework 6.0, and eventually these settings will be removed.
in Robot Framework 7.0, and eventually these settings will be removed.
Tools like Tidy__ can be used to ease transition.

Robot Framework 5.2 will introduce a new way for tests to indicate they
Robot Framework 6.1 will introduce a new way for tests to indicate they
`should not get certain globally specified tags`__. Instead of using a separate
setting that tests can override, tests can use syntax `-tag` with their
:setting:`[Tags]` setting to tell they should not get a tag named `tag`.
Expand All @@ -689,7 +689,7 @@ This syntax *does not* yet work in Robot Framework 6.0, but using
If such tags are needed, they can be set using :setting:`Test Tags` or
escaped__ syntax `\-tag` can be used with :setting:`[Tags]`.

__ https://robotidy.readthedocs.io/
__ https://robotidy.readthedocs.io
__ https://github.com/robotframework/robotframework/issues/4374
__ https://github.com/robotframework/robotframework/issues/4380
__ escaping_
Expand Down
Expand Up @@ -195,7 +195,7 @@ activating the special functionality.
versions all keyword tags need to be specified using the
:setting:`[Tags]` setting.

.. note:: Robot Framework 5.2 will support `removing globally set tags`__ using
.. note:: Robot Framework 6.1 will support `removing globally set tags`__ using
the `-tag` syntax with the :setting:`[Tags]` setting. Creating tags
with literal value like `-tag` `is deprecated`__ in Robot Framework 6.0
and escaped__ syntax `\-tag` must be used if such tags are actually
Expand Down
1 change: 0 additions & 1 deletion doc/userguide/src/ExecutingTestCases/TestExecution.rst
Expand Up @@ -621,7 +621,6 @@ using signals `INT` and `TERM`. These signals can be sent
from the command line using ``kill`` command, and sending signals can
also be easily automated.


Using keywords
~~~~~~~~~~~~~~

Expand Down
11 changes: 5 additions & 6 deletions src/robot/running/arguments/embedded.py
Expand Up @@ -44,13 +44,12 @@ def map(self, values):
def validate(self, values):
# Validating that embedded args match custom regexps also if args are
# given as variables was initially implemented in RF 6.0. It needed
# to be reverted due to backwards incompatibility reasons:
# to be reverted due to backwards incompatibility reasons but the plan
# is to enable it again in RF 7.0:
# https://github.com/robotframework/robotframework/issues/4069
#
# We hopefully can add validation back in RF 5.2 or 6.0. A precondition
# is implementing better approach to handle conflicts with keywords
# using embedded arguments:
# https://github.com/robotframework/robotframework/issues/4454
# TODO: Emit deprecation warnings if patterns don't match in RF 6.1:
# https://github.com/robotframework/robotframework/issues/4524
#
# Because the plan is to add validation back, the code was not removed
# but the `ENABLE_STRICT_ARGUMENT_VALIDATION` guard was added instead.
Expand All @@ -65,7 +64,7 @@ def validate(self, values):
for arg, value in zip(self.args, values):
if arg in self.custom_patterns and is_string(value):
pattern = self.custom_patterns[arg]
if not re.match(pattern + '$', value):
if not re.fullmatch(pattern, value):
raise ValueError(f"Embedded argument '{arg}' got value '{value}' "
f"that does not match custom pattern '{pattern}'.")

Expand Down
2 changes: 1 addition & 1 deletion src/robot/running/builder/transformers.py
Expand Up @@ -566,7 +566,7 @@ def deprecate_tags_starting_with_hyphen(node, source):
LOGGER.warn(
f"Error in file '{source}' on line {node.lineno}: "
f"Settings tags starting with a hyphen using the '[Tags]' setting "
f"is deprecated. In Robot Framework 5.2 this syntax will be used "
f"is deprecated. In Robot Framework 6.1 this syntax will be used "
f"for removing tags. Escape '{tag}' like '\\{tag}' to use the "
f"literal value and to avoid this warning."
)

0 comments on commit a5b698d

Please sign in to comment.