Skip to content

Conversation

@amoghrajesh
Copy link
Contributor

types-docutils released types-docutils 0.21.0.20250715 with more stricter checks for types under nodes.

Adding some reactive type checks in our devel common modules to account / address that.

Example failure: https://github.com/apache/airflow/actions/runs/16287041685/job/45988572938

Error:

devel-common/src/sphinx_exts/substitution_extensions.py:64: error: Unsupported right operand type for in ("Node")  [operator]
                if _SUBSTITUTION_OPTION_NAME not in node:
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
devel-common/src/sphinx_exts/substitution_extensions.py:79: error: "Node" has no attribute "replace"  [attr-defined]
                        child = nodes.Text(child.replace(f"|{name}|", replacement))
                                           ^~~~~~~~~~~~~
devel-common/src/sphinx_exts/substitution_extensions.py:80: error: "Node" has no attribute "replace"  [attr-defined]
                    node.replace(old_child, child)
                    ^~~~~~~~~~~~
devel-common/src/sphinx_exts/substitution_extensions.py:83: error: "Node" has no attribute "rawsource"; maybe "source"?  [attr-defined]
                node.rawsource = node.astext()
                ^~~~~~~~~~~~~~
Found 4 errors in 1 file (checked 84 source files)

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@amoghrajesh amoghrajesh self-assigned this Jul 15, 2025
@amoghrajesh
Copy link
Contributor Author

Failing tests are unrelated

@amoghrajesh amoghrajesh merged commit 7654e1a into apache:main Jul 15, 2025
101 of 102 checks passed
@Dev-iL
Copy link
Collaborator

Dev-iL commented Jul 15, 2025

Heh you beat me to it with this PR.

BTW, is the fact that a new types-docutils that breaks builds was merged requires some CI-reconfiguration so as not to happen again?

potiuk pushed a commit to potiuk/airflow that referenced this pull request Jul 26, 2025
…pache#53364)

(cherry picked from commit 7654e1a)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
potiuk added a commit that referenced this pull request Jul 26, 2025
…53364) (#53778)

(cherry picked from commit 7654e1a)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants