forked from robotframework/robotframework
-
Notifications
You must be signed in to change notification settings - Fork 1
[pull] master from robotframework:master #145
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
Open
pull
wants to merge
1,492
commits into
testautomation:master
Choose a base branch
from
robotframework:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Manage this branch in SquashTest this branch here: https://master-n02a3.squash.io |
According to the [docs](https://typing.readthedocs.io/en/latest/spec/distributing.html#library-interface-public-and-private-symbols), we could have listed everything in `__all__` as well, but using redundant import aliases like `from x.y import z as z` was considered easier to maintain. Fixes #5245. --------- Co-authored-by: lcmartin <luis.martinez@collins.com>
Also make sure messages logged normally are always converted to strings. This means that something like `logger.info(None)` logs a string `None` instead of the message being discarded. Fixes #5251.
`TypeConverters` gets `languages` that can be a `Languages` instance or `None`. In the latter case a new `Languages` instance is needed if someone accesses `TypeConverters.languages`. Earlier `Languages` was created already in `__init__`, but now it is done only if `TypeConverter.languages` is actually accessed. This doesn't affect execution at all, because then `langauges` is always a `Languages` instance. With Libdoc `languages` is always `None` and `TypeConverters.languages` is never accessed, so lazy initialization saves time. Apparently initializing `Languages` is rather slow, because this causes roughly 50% performance enhancement with really big libraries. Investigating why initialization is so slow could be a good idea, but this fix makes sense anyway. Fixes #5254.
No need to go through what languages would be available if no custom language has been used. This would be an OK fix for Libdoc performance degradation (#5254), but the fix in the previous commit is even better. Anyway, this change makes sense on its own as well.
Earlier failure in suite setup initiated exit-on-failure even if all tests would have skip-on-failure active. Fixes #5170.
Earlier these lines could only contain one data token. That meant that having two spaces after `Language:` didn't work. Now values from all tokens are joined together. Fixes #5202.
Also test with bytearray in addition to bytes.
For example, `${x}${y}${z}` now yields bytes if all variables are bytes or bytearrays. If any of them is somethign else, or if there's a constant string like in `${x}-${y}`, the result is a string. Earlier the result was a string in all these cases. Fixes #5259.
Now all bytes are mapped to Unicode code points with the same ordinal (which is same as Latin-1 encoding). Earlie only the bytes in the ASCII range were handled that way and other bytes were shown in an escaped format. Fixes #5052.
Earlier execution stopped if there was a SKIP and the test got the SKIP status as well. Now all iterations are executed and the final status is: - FAIL is any iteration failed. - PASS if any iteration succeeded and there were no FAILs. - SKIP if all iterations succeeded. This is similar to how suite status is calculated based on test statuses. Fixes #4426. --------- Co-authored-by: elajolh <lajos.olah@ericsson.com>
curl and zip apparently were used by old report/log upload setup, but the new rflogs based setup shouldn't need them. Installing zip failed on Windows on the latest run so hopefully this fixes that problem.
curl and zip were used by old report/log upload setup, but the new rflogs based setup doesn't need them.
- PyPy 3.8 -> PyPy 3.10 - Python used as the runner to Python 3.13
It should have been removed when --critical was removed, but apparenlty it was left here by accident.
Affects using `--skip` and `--skip-on-failure` options as well as `robot:skip` and `robot:skip-on-failure` tags. Messages are now consistent and the used tags are shown. Fixes #5264.
Earlier nested converters were stored in different ways depending on the converter. These instance attributes existed: - converter: TypeConverter | None - converters: tuple[TypeConverter, ...] - converters: dict[str, TypeConverter] - converters: list[tuple[Any, TypeConverter]] After this commit, attributes are: - nested: list[TypeConverter] - nested: dict[str, TypeConverter] This makes it a lot easier to have generic code that inspects nested converters. That, on the other hand, makes it easy to allow configuring how unknown nested types like `list[Unknown]` are handled. They are accepted in library keyword arguments, but with variables (#3278) that should be an error. The current design still has two problems: - It would be better to have uniform type for `nested`. Currently most TypeConverters use a list, but TypedDictConverter needs to map keys to converters and uses a dict. We probably could avoid that by storing the key to an optional attribute in TypeConverter and using a list, but that would then make finding a right converter for a key a bit more complicated and slower. - With TypeInfo normal nested converts are in `nested`, but TypedDictInfo uses separate `annotations`. That's inconsistent to TypeConverters, but changing that is not trivial. The reason is that unlike TypeConverter, TypeInfo is part of the public API so changes need to take backwards compatibility into account. That change would also affect Libdoc code and possibly also Libdoc spec files. This isn't worth the effort now, bu can be considered later, preferably in a major release.
Earlier `TypeInfo.get_converter` (and `TypeInfo.convert` that uses it) raised a TypeError if there was no converter for the type itself, but didn't care about possible nested unknown converters. Now handling unknown types is configurable: - If `allow_unknown` is False (default), a TypeError is raised if the type itself or any of its nested types have no converter. This makes it easy to reject types like `list[Unknown]`, which is something we want to do in variable conversion (#3278). - If `allow_unknown` is True, a special `UnknownConverter` is returned and its `convert` returns the original value as-is. These changes required adapting the argument conversion logic to avoid changes affecting corner cases like `arg: Unknown = None`.
Also enhance related tests.
- Fix problem if variabe name contains characters also in the keyword name. This typically occurs only with embedded arguments. Fixes #5330. - Fix using embedded arguments that use custom patterns with variables using inline Python evaluation syntax. Fixes #5394. - Add tests for using embedded arguments with variables and other content. This unfortunately doesn't work if embedded arguments use custom patterns (#5396). Above problems were fixed by replacing variables with placeholders before matching keywords and then replacing placeholders with original variables afterwards. With custom patterns also automatically added pattern that matched variables (and failed to match the inline evaluation syntax) needed to be updated to match the placeholder instead.
…uages-in-help Feat: libdoc dynamic languages in help
Avoid conflict with Python's standard exception with the same name. Related to #5377.
This is related to #5393. Problems were discovered when unit tests didn't succeed on Python 3.8. Investigation reveladed this: 1. Python 3.8 doesn't have Annotated that was used in a test that validated the fix for #5393. 2. Annotated can be imported from typing_extensions in tests, but it turned out that Python 3.8 get_origin and get_args don't handle it properly so test continued to fail. 3. A fix for the above was trying to import also get_origin and get_args from typing_extensions on Python 3.8. That fixed the provious problem, but string representation was still off. 4. It turned out that our type_name and type_repr didn't handle Annotated and TypeRef properly. Most likely the same issue occurred also with other parameterized special forms.
Don't remove existing SUITE scope variables with same name. Fixes #5399.
`Process.run_process` signature will change as part of #5412. Better to use a custom library in Libdoc tests instead.
See issue #3278. User Guide documentation still missing and some cleanup to be done.
- Enhance error reporting with embedded args having invalid type. - Consistent test case naming style. - Some code cleanup. Part of #3278.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )