-
Notifications
You must be signed in to change notification settings - Fork 221
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
PytestRemovedIn8Warning: #325
PytestRemovedIn8Warning: #325
Conversation
The (fspath: py.path.local) argument to ErpcgenFile is deprecated. Please use the (path: pathlib.Path) argument instead. Signed-off-by: Cervenka Dusan <[email protected]>
51d2df6
to
dfeee2d
Compare
Signed-off-by: Cervenka Dusan <[email protected]>
dfeee2d
to
cc8ee16
Compare
@MichalPrincNXP i think this one can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an idea what causes this error when running erpcgen tests?
24-Jan-2023 14:42:06 | class ErpcgenTestSpec(object):
24-Jan-2023 14:42:06 | conftest.py:317: in ErpcgenTestSpec
24-Jan-2023 14:42:06 | def __init__(self, name: str, path: path.local, spec: dict[str, typing.Any], verbosity: int = 0):
24-Jan-2023 14:42:06 | E TypeError: 'type' object is not subscriptable
Where do you see that message? I don't see it |
when executing erpc\erpcgen\test>py.test |
Are you executing it on your machine? I don't see any of these messages in circleci logs |
If you are executing it on your machine, be sure you are using pytest for python3 |
We are using Python 3.8.10, pytest-7.1.2, pluggy-1.0.0, this seems to be quite latest setup |
CircelCI is using Python 3.10.6, pytest-7.2.0, pluggy-1.0.0 |
Coudl you add print directly under init? print(f"name:{name} path:{path} spec:{spec} verbosity:{verbosity}") I think spec is crucial. |
acrios_cervennka@acrios-cervennka-ThinkPad-P50:~/repozitare/acrios-erpc/erpcgen/test$ python3.8 -m pytest
ImportError while loading conftest '/home/acrios_cervennka/repozitare/acrios-erpc/erpcgen/test/conftest.py'.
conftest.py:301: in <module>
class ErpcgenTestSpec(object):
conftest.py:317: in ErpcgenTestSpec
def __init__(self, name: str, path: path.local, spec: dict[str, typing.Any], verbosity: int = 0):
E TypeError: 'type' object is not subscriptable I am able to reproduce error. Issue is with python3.8 version not pytest version. I will take a look |
The issue is with using typing.Any. Python3.8 is not able to parse it correctly. I pushed fix for 3.8 (removing data types definition) |
Signed-off-by: Cervenka Dusan <[email protected]>
8f9b88e
to
a1ea8b3
Compare
Thank you Dusan for the effort and the latest fix for Python 3.8. We have now switched to the ubuntu22+python3.10 like in CircleCI for internal testing, to be on the same page. The old setup with ubuntu20+python3.8 is kept and I have been able to validate your latest fix for python 3.8 |
Yeah i wanted ubuntu 20.04 lts but it was not available on circle ci so i moved to latest lts 22.04. |
Signed-off-by: Cervenka Dusan [email protected]
Pull request
Choose Correct
Describe the pull request
The (fspath: py.path.local) argument to ErpcgenFile is deprecated. Please use the (path: pathlib.Path) argument instead.
To Reproduce
Run pytest tests without modification
Expected behavior
No warning
Screenshots
Desktop (please complete the following information):
Steps you didn't forgot to do
Additional context