You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tests failed. I analyzed why they failed and these were the reasons:
Python 3.11 has enhanced error reporting and as a part of that tracebacks have ^^^^ markers showing where errors occur in more detail. This breaks some unit tests, but they are easy to fix by filtering such lines away from tracebacks before comparing them.
typing.get_type_hints doesn't anymore automatically add None to the returned types if an argument has None as a default value. This means that if you have a keyword with a signature like arg: str = None, arg only has str as a type nowadays when earlier it had both str and None (i.e. NoneType). This means that if you call the keyword with a None object, it is not anymore accepted as-is but instead converted to a string None. I don't like out conversion behavior depending on Python versions, so I'll adapt the code so that None isn't converted if an argument has None as a default.
Python 3.11 is more strict about embedding flags to regexp patterns. With earlier versions, for example, ^(?s)x works but it causes an error with Python 3.11. Luckily the only place in the code this error occurs isString.Get Lines Matching Regexp keyword and fixing it is easy.
Getting tests to pass on CI turned out to be somewhat hard. Strangely more tests validating tracebacks failed on CI due to those ^^^ lines added by Python 3.11. CI uses beta 3 while I tested locally with beta 4, but it would be a strange if that affected this behavior. Anyway, I got tests passing also on CI by removing ^^^ lines.
Also needed to disable testing using Python 3.11 on Windows. Too many dependencies lacked Python 3.11 support.
Activity
pekkaklarck commentedon Jul 12, 2022
Some tests failed. I analyzed why they failed and these were the reasons:
^^^^markers showing where errors occur in more detail. This breaks some unit tests, but they are easy to fix by filtering such lines away from tracebacks before comparing them.typing.get_type_hintsdoesn't anymore automatically addNoneto the returned types if an argument hasNoneas a default value. This means that if you have a keyword with a signature likearg: str = None,argonly hasstras a type nowadays when earlier it had bothstrandNone(i.e.NoneType). This means that if you call the keyword with aNoneobject, it is not anymore accepted as-is but instead converted to a stringNone. I don't like out conversion behavior depending on Python versions, so I'll adapt the code so thatNoneisn't converted if an argument hasNoneas a default.^(?s)xworks but it causes an error with Python 3.11. Luckily the only place in the code this error occurs isString.Get Lines Matching Regexpkeyword and fixing it is easy.Stricter flag usage in regexp patterns.
Fix traceback related test on Python 3.11. #4401
Adjust code and tests to new `typing.get_type_hints` semantics.
Add Python 3.11 support to project metadata. #4401
Adjust test runs on CI.
New attempt to configure Python 3.11 run on CI. #4401
Try to fix atests failing on CI but not locally.
Try to fix final atests failing on CI but not locally.
Don't run tests on CI with Python 3.11 on Windows. #4401
New attempt to not run tests wilt Python 3.11 on Windows on CI. #4401
pekkaklarck commentedon Jul 12, 2022
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
^^^lines added by Python 3.11. CI uses beta 3 while I tested locally with beta 4, but it would be a strange if that affected this behavior. Anyway, I got tests passing also on CI by removing^^^lines.Also needed to disable testing using Python 3.11 on Windows. Too many dependencies lacked Python 3.11 support.
ShemTovYosef commentedon Oct 19, 2022
Hi @pekkaklarck
We want to move to python 3.11 and are currently blocked due to this issue: robotframework/PythonRemoteServer#78
Do you have any plans for it?
pekkaklarck commentedon Oct 19, 2022
PythonRemoteServer has been neglected for too long. Now that RF 6.0 is out, I ought to have time to look at it.