|
111 | 111 | # add any custom intersphinx for astropy |
112 | 112 | intersphinx_mapping.update( |
113 | 113 | { |
114 | | - "astropy-dev": ("https://docs.astropy.org/en/latest/", None), |
115 | 114 | "pyerfa": ("https://pyerfa.readthedocs.io/en/stable/", None), |
116 | 115 | "pytest": ("https://docs.pytest.org/en/stable/", None), |
117 | 116 | "ipython": ("https://ipython.readthedocs.io/en/stable/", None), |
@@ -385,29 +384,22 @@ def rstjinja(app, docname, source): |
385 | 384 | source[0] = rendered |
386 | 385 |
|
387 | 386 |
|
388 | | -def resolve_astropy_and_dev_reference(app, env, node, contnode): |
| 387 | +def resolve_astropy_reference(app, env, node, contnode): |
389 | 388 | """ |
390 | | - Reference targets for ``astropy:`` and ``astropy-dev:`` are special cases. |
| 389 | + Reference targets for ``astropy:`` are special cases. |
391 | 390 |
|
392 | 391 | Documentation links in astropy can be set up as intersphinx links so that |
393 | 392 | affiliate packages do not have to override the docstrings when building |
394 | 393 | the docs. |
395 | 394 |
|
396 | | - If we are building the development docs it is a local ref targeting the |
397 | | - label ``astropy-dev:<label>``, but for stable docs it should be an |
398 | | - intersphinx resolution to the development docs. |
399 | | -
|
400 | | - See https://github.com/astropy/astropy/issues/11366 |
401 | 395 | """ |
402 | 396 | # should the node be processed? |
403 | 397 | reftarget = node.get("reftarget") # str or None |
404 | 398 | if str(reftarget).startswith("astropy:"): |
405 | 399 | # This allows Astropy to use intersphinx links to itself and have |
406 | 400 | # them resolve to local links. Downstream packages will see intersphinx. |
407 | | - # TODO! deprecate this if sphinx-doc/sphinx/issues/9169 is implemented. |
| 401 | + # TODO: Remove this when https://github.com/sphinx-doc/sphinx/issues/9169 is implemented upstream. |
408 | 402 | process, replace = True, "astropy:" |
409 | | - elif dev and str(reftarget).startswith("astropy-dev:"): |
410 | | - process, replace = True, "astropy-dev:" |
411 | 403 | else: |
412 | 404 | process, replace = False, "" |
413 | 405 |
|
@@ -591,6 +583,6 @@ def setup(app): |
591 | 583 | # Generate the page from Jinja template |
592 | 584 | app.connect("source-read", rstjinja) |
593 | 585 | # Set this to higher priority than intersphinx; this way when building |
594 | | - # dev docs astropy-dev: targets will go to the local docs instead of the |
| 586 | + # docs astropy: targets will go to the local docs instead of the |
595 | 587 | # intersphinx mapping |
596 | | - app.connect("missing-reference", resolve_astropy_and_dev_reference, priority=400) |
| 588 | + app.connect("missing-reference", resolve_astropy_reference, priority=400) |
0 commit comments