-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Python 3.11 compatibility #4401
Comments
Some tests failed. I analyzed why they failed and these were the reasons:
|
Part of Python 3.11 compatibility. #4401
Filter away new `^^^` lines showing where the error occurred.
Python 3.11 changed `typing.get_type_hints` so that `None` isn't anymore added to returned types automatically if an argument has `None` as a default value. That changed our argument conversion logic so that if you have an argument like `arg: str = None` and pass it a `None` object, it isn't passed as-is but instead converted to a string `None`. Argument conversion depending on Python versions wouldn't be great, so this commit changes the logic so that `None` is never converted if an argument has `None` as a default. The same change also changed how types are shown by Libdoc. Earlier `arg: str = None` was shown as `arg: str | None = None`, but nowadays it's just `arg: str = None`. I prefer the new formatting and just updated tests so that they expect that if Python 3.11+. This is part of Python 3.11 compatibility. #4401
- Run PRs against Python 3.6 and 3.10 instead of Python 3.6 and 3.9. - Use Python 3.10 as the "runner side" Python with acceptance tests. - Run tests also against Python 3.11. #4401
These fail on CI with Python 3.11 due to `^^^` lines it adds to tracebacks. It's strange same tests pass locally but hopefully filtering those lines fixes tests on CI as well. Part of #4401.
This test fails on CI with Python 3.11 due to `^^^` lines it adds to tracebacks. It's strange it passes locally, but hopefully filtering those lines fixes it on CI like it has fixed other similar tests. Part of #4401.
Too many dependencies we need seem to be unavailable at the moment.
This is now done. Getting tests to pass on CI turned out to be somewhat hard. Strangely more tests validating tracebacks failed on CI due to those Also needed to disable testing using Python 3.11 on Windows. Too many dependencies lacked Python 3.11 support. |
Hi @pekkaklarck We want to move to python 3.11 and are currently blocked due to this issue: robotframework/PythonRemoteServer#78 |
PythonRemoteServer has been neglected for too long. Now that RF 6.0 is out, I ought to have time to look at it. |
Python 3.11 is getting ready and we need to test that RF 5.1 is compatible with it. That requires:
The text was updated successfully, but these errors were encountered: