Closed
Description
Steps to reproduce
- Checkout apache airlfow (https://github.com/apache/airflow)
- Install airflow with doc extras
pip install ".[doc]"
- Make sure to use latest astroid version
pip install --upgrade astroid
(2.12.1 should be installed) - export PYTHONPATH=$(pwd)
- ./docs/build_docs.py --package-filter apache-airflow --one-pass-only --docs-only
- docs build fails with 111 errors similar to:
------------------------------ Error 95 --------------------
File "/usr/local/lib/python3.7/site-packages/astroid/nodes/node_ng.py", line 182, in infer
------------------------------ Error 96 --------------------
File "/usr/local/lib/python3.7/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 1842, in _is_metaclass
- downgrade astroid to 2.11.7:
pip install astroid==2.11.7
- ./docs/build_docs.py --package-filter apache-airflow --one-pass-only --docs-only
- Observe the build succeeds.
NOTE. The above might fail because of libenchant could not be installed (especially on MacOS silicon)
You can reproduce it easily using our CI docker image - with all dependencies needed installed:
- docker run -it ghcr.io/apache/airflow/main/ci/python3.7:2af19f16a4d94e749bbf6c7c4704e02aac35fc11
- ./docs/build_docs.py --package-filter apache-airflow --one-pass-only --docs-only
- docs build fails with 111 errors similar to:
------------------------------ Error 95 --------------------
File "/usr/local/lib/python3.7/site-packages/astroid/nodes/node_ng.py", line 182, in infer
------------------------------ Error 96 --------------------
File "/usr/local/lib/python3.7/site-packages/astroid/nodes/scoped_nodes/scoped_nodes.py", line 1842, in _is_metaclass
- downgrade astroid to 2.11.7:
pip install astroid==2.11.7
- ./docs/build_docs.py --package-filter apache-airflow --one-pass-only --docs-only
- Observe the build succeeds.
Also downgrading to 2.12.0 leads to failures.
Example failure in CI: https://github.com/apache/airflow/runs/7291353339?check_suite_focus=true#step:9:6115
Current behavior
Version 2.12.* of astroid causes sphinx autoapi to fail
Version 2.11.7 of astroid and before works.
Expected behavior
- Version 2.12.* of astroid should work with sphinx autoapi
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
2.12.1