Skip to content

Vendor Python 3.10 intersphinx inventory for pydabs docs - #6897

Open
Sankalp-Mittal wants to merge 1 commit into
mainfrom
sankalp-mittal/add-local-objects.inv
Open

Sankalp-Mittal wants to merge 1 commit into
mainfrom
sankalp-mittal/add-local-objects.inv

Conversation

@Sankalp-Mittal

Copy link
Copy Markdown
Contributor

Problem

The pydabs docs build (python/Taskfile.yml pydabs-docs) resolves stdlib cross-references via Sphinx intersphinx, which fetched https://docs.python.org/3.10/objects.inv over the network on every build. When docs.python.org returns 503 (as it did this morning — see internal report), the inventory fails to load, the stdlib references (collections.abc.Callable, types.ModuleType) go unresolved, and --nitpicky + -W turn those warnings into a hard build failure.

Note the 503 trips -W on its own even without --nitpicky: intersphinx logs its own "failed to reach any of the inventories" warning independent of nitpick mode, so fixing the gate flags wouldn't address the root cause — the build's network dependency on docs.python.org.

Fix

Vendor the inventory locally (python/docs/_inventory/python-3.10.inv) and point intersphinx at the committed file:

intersphinx_mapping = {
    "python": ("https://docs.python.org/3.10", "_inventory/python-3.10.inv"),
}

The public URL is still used to build the output links; only the inventory is read from disk, so a docs.python.org outage can no longer break the build. Python 3.10 is frozen, so the file never needs refreshing. This keeps the strict -W gate and the stdlib hyperlinks intact while removing the flaky network dependency.

Verification

  • sphinx-build docs docs/_output --nitpicky --fresh-env --keep-going -W succeeds with zero warnings.
  • intersphinx logs loading intersphinx inventory 'python' from _inventory/python-3.10.inv (local, not network).
  • Build still succeeds with outbound HTTPS blocked, proving it no longer depends on docs.python.org.

This pull request and its description were written by Isaac.

The pydabs docs build (python/Taskfile.yml) resolves stdlib
cross-references via intersphinx, which fetched
docs.python.org/3.10/objects.inv over the network on every build.
When docs.python.org returns 503, the inventory fails to load, the
stdlib references go unresolved, and --nitpicky + -W turn that into a
hard build failure.

Vendor the inventory locally and point intersphinx at the committed
file. The public URL is still used for the generated links; only the
inventory is read from disk, so a docs.python.org outage can no longer
break the build. Python 3.10 is frozen, so the file never needs
refreshing.

Verified: strict build (--nitpicky -W) succeeds with zero warnings,
and still succeeds with outbound HTTPS blocked.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: c0b159b

Run: 36853893176

Env ✅​pass 🙈​skip Time
✅​ aws linux 276 15 6:00
✅​ aws windows 278 13 3:22
✅​ azure linux 275 15 6:04
✅​ azure windows 277 13 3:27
✅​ gcp linux 276 15 6:42
✅​ gcp windows 278 13 3:20
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:08 azure linux TestAccept
4:05 gcp linux TestAccept
3:58 aws linux TestAccept
3:25 azure windows TestAccept
3:20 aws windows TestAccept
3:18 gcp windows TestAccept

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants