Skip to content
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-devicetree tox run fails #46286

Closed
stephanosio opened this issue Jun 5, 2022 · 1 comment · Fixed by #46311
Closed

python-devicetree tox run fails #46286

stephanosio opened this issue Jun 5, 2022 · 1 comment · Fixed by #46311
Assignees
Labels
area: Continuous Integration area: Devicetree Tooling PR modifies or adds a Device Tree tooling area: Scripts Scripts bug The issue is a bug, or the PR is fixing a bug

Comments

@stephanosio
Copy link
Member

stephanosio commented Jun 5, 2022

Describe the bug

tox test for python-devicetree fails with the following message:

py3 run-test: commands[1] | python -m mypy --config-file=/home/runner/work/zephyr/zephyr/scripts/dts/python-devicetree/tox.ini --package=devicetree
src/devicetree/edtlib.py:2951: error: Cannot infer type argument 1 of "add_constructor" of "BaseConstructor"
src/devicetree/edtlib.py:2951: error: Cannot infer type argument 2 of "add_constructor" of "BaseConstructor"
src/devicetree/edtlib.py:2953: error: "object" has no attribute "construct_pairs"
Found 3 errors in 1 file (checked 4 source files)

This is broken since the types-PyYAML version 6.0.8 (latest as of now); it succeeds with 6.0.7.

https://github.com/zephyrproject-rtos/zephyr/runs/6744542428?check_suite_focus=true#step:8:25

To Reproduce

Run tox inside scripts/dts/python-devicetree.

Expected behavior

tox test succeeds.

Impact

CI reports a failure.

@stephanosio stephanosio added bug The issue is a bug, or the PR is fixing a bug area: Devicetree Tooling PR modifies or adds a Device Tree tooling area: Continuous Integration area: Scripts Scripts labels Jun 5, 2022
@stephanosio
Copy link
Member Author

cc @mbolivar-nordic

mbolivar-nordic added a commit to mbolivar-nordic/zephyr that referenced this issue Jun 6, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: zephyrproject-rtos#46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
mbolivar-nordic added a commit that referenced this issue Jun 6, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: #46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
stephanosio pushed a commit to stephanosio/zephyr that referenced this issue Nov 27, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: zephyrproject-rtos#46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
stephanosio pushed a commit to stephanosio/zephyr that referenced this issue Nov 27, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: zephyrproject-rtos#46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
stephanosio pushed a commit to stephanosio/zephyr that referenced this issue Nov 27, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: zephyrproject-rtos#46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
stephanosio pushed a commit that referenced this issue Nov 27, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: #46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
stephanosio pushed a commit that referenced this issue Nov 27, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: #46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
stephanosio pushed a commit that referenced this issue Nov 27, 2022
Pin the types-PyYAML version to 6.0.7. Version 6.0.8 is causing CI
errors for other pull requests, so we need this in to get other PRs
moving.

Fixes: #46286

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
dottspina added a commit to dottspina/zephyr that referenced this issue Dec 26, 2022
This is essentially a revert of PR zephyrproject-rtos#46311 "python-devicetree: CI hotfix",
assuming the original issue has been resolved, either upstream in
types-PyYAML or in Zephyr itself.

Tested with types-PyYAML 6.0.12.2 (current version at PyPI):

  $ python -m mypy --config-file=tox.ini --package=devicetree
  dtlib.py:962: note: By default the bodies of untyped functions [...]
  dtlib.py:964: note: By default the bodies of untyped functions [...]
  dtlib.py:965: note: By default the bodies of untyped functions [...]
  dtlib.py:967: note: By default the bodies of untyped functions [...]
  Success: no issues found in 4 source files

The "notes" above are harmless (use of type hinting to define local
variables while mypy won't "check the bodies of untyped functions").

References:
- python-devicetree tox run fails (issue zephyrproject-rtos#46286)
- python-devicetree: CI hotfix (PR zephyrproject-rtos#46311)
- python-devicetree: CI hotfix (commit f6a6843)

Signed-off-by: Chris Duf <chris@openmarl.org>
fabiobaltieri pushed a commit that referenced this issue Jan 16, 2023
This is essentially a revert of PR #46311 "python-devicetree: CI hotfix",
assuming the original issue has been resolved, either upstream in
types-PyYAML or in Zephyr itself.

Tested with types-PyYAML 6.0.12.2 (current version at PyPI):

  $ python -m mypy --config-file=tox.ini --package=devicetree
  dtlib.py:962: note: By default the bodies of untyped functions [...]
  dtlib.py:964: note: By default the bodies of untyped functions [...]
  dtlib.py:965: note: By default the bodies of untyped functions [...]
  dtlib.py:967: note: By default the bodies of untyped functions [...]
  Success: no issues found in 4 source files

The "notes" above are harmless (use of type hinting to define local
variables while mypy won't "check the bodies of untyped functions").

References:
- python-devicetree tox run fails (issue #46286)
- python-devicetree: CI hotfix (PR #46311)
- python-devicetree: CI hotfix (commit f6a6843)

Signed-off-by: Chris Duf <chris@openmarl.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Continuous Integration area: Devicetree Tooling PR modifies or adds a Device Tree tooling area: Scripts Scripts bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants