Skip to content

Conversation

@uranusjr
Copy link
Member

@uranusjr uranusjr commented Dec 3, 2021

We need at least 1.5.0 for typing.overload support, but I’m relaxing to include all future 1.x because why not. See #20011.

@uranusjr uranusjr force-pushed the bump-sphinx-autoapi branch from d306365 to d684139 Compare December 3, 2021 13:08
@ashb
Copy link
Member

ashb commented Dec 3, 2021

  apache-airflow                                               Traceback (most recent call last):
  apache-airflow                                                 File "/opt/airflow/docs/exts/docs_build/run_patched_sphinx.py", line 23, in <module>
  apache-airflow                                                   from autoapi.extension import (
  apache-airflow                                               ImportError: cannot import name 'default_backend_mapping' from 'autoapi.extension' 
  (/usr/local/lib/python3.7/site-packages/autoapi/extension.py)

Now that we're upgradaing autoapi we can entirely avoid run_patched_sphinx.py s the work-around we are applying is included.

@uranusjr uranusjr force-pushed the bump-sphinx-autoapi branch from f43c6ed to 49eced3 Compare December 3, 2021 14:05
@uranusjr uranusjr requested a review from kaxil as a code owner December 3, 2021 14:05
@uranusjr uranusjr changed the title Allow all sphinx-autoapi 1.x series Bump sphinx-autoapi to >=1.5 Dec 3, 2021
@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Dec 3, 2021
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@kaxil
Copy link
Member

kaxil commented Dec 3, 2021

cc @mik-laj

@potiuk
Copy link
Member

potiuk commented Dec 3, 2021

Just one watchout - I am afraid many more changes are needed for that. As far as I remember there was a problem with Sphinx-autoapi support related to namespace packages (but I remember it vaguely) and there are some workarounds and sphinx patching https://github.com/apache/airflow/blob/main/docs/exts/docs_build/run_patched_sphinx.py to make it works. So upgrading autoapi might turn into much bigger task than you think (but I believe it is a long overdue one so maybe worth doing it).

@potiuk
Copy link
Member

potiuk commented Dec 3, 2021

AH I see @ashb already commented about it.

@mik-laj
Copy link
Member

mik-laj commented Dec 3, 2021

In the past, I worked on upgrade for sphinx-autoapi. https://github.com/apache/airflow/pull/15206/files. but I didn't have enough power to finish it.

@uranusjr
Copy link
Member Author

uranusjr commented Dec 6, 2021

Ugh, I give up. Let’s just hide the overloaded definitions from autoapi. (Why are we using autoapi in the first place?)

@uranusjr uranusjr closed this Dec 6, 2021
@potiuk
Copy link
Member

potiuk commented Dec 6, 2021

Ugh, I give up. Let’s just hide the overloaded definitions from autoapi. (Why are we using autoapi in the first place?)

Now there are 4 of us that gave up after trying. Do I see a pattern here? (and yeah @mik-laj - why do we use autoapi ?)

@mik-laj
Copy link
Member

mik-laj commented Dec 6, 2021

It was the only tool I found at the moment that generated files for each class without having to manually create the files. We too were constrained by RTD.

@uranusjr
Copy link
Member Author

uranusjr commented Dec 7, 2021

There’s a new effort in #20079.

@uranusjr uranusjr deleted the bump-sphinx-autoapi branch April 15, 2022 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full tests needed We need to run full set of tests for this PR to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants