trio
trio copied to clipboard
Bump RTD builder Python version
This is erroring on master due to (AFAICT) trio doing magic to make Sphinx realize link_to
exists, but then using Python 3.12's Sphinx index to find it (which obviously doesn't work).
This does raise the interesting question of whether functions that are removed will show up in the output, as we cannot expect everyone to be using Python 3.12. I'm not sure what to do about this.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
a10f94b
) 99.68% compared to head (2445a55
) 99.68%.
Additional details and impacted files
@@ Coverage Diff @@
## master #2817 +/- ##
=======================================
Coverage 99.68% 99.68%
=======================================
Files 117 117
Lines 17546 17546
Branches 3152 3152
=======================================
Hits 17490 17490
Misses 38 38
Partials 18 18
What might be better is to just hardcode the older URL for this specific link. I just disabled the link and added a deprecation warning in #2815...
Ack I didn't read that PR yet. Ideally we would use an old intersphinx inventory but still link to the latest version of the Python documentation... but I'm not sure if that's possible.
Personally I would super duper rather just build our docs on 3.12 but unfortunately RTD doesn't support that yet. I think your solution is more pragmatic though (while it's probably more correct to not have a mismatch... it's not worth linking to older docs). I have to think about this a bit xd
I've gone ahead and submitted https://github.com/readthedocs/readthedocs.org/pull/10808 which might help things along
Figured out an even better solution. We can just add an event listener which manually adds the definition into intersphinx's list of objects, with a 3.11 URL. Actually that probably would work for most of the other entries in nitpick_ignore
.
That sounds like a plan. I'm not comfortable enough with Sphinx to do that though... maybe you could? :P
/home/docs/checkouts/readthedocs.org/user_builds/trio/checkouts/2817/trio/__init__.py:docstring of trio.Path:1: WARNING: py:meth reference target not found: pathlib.Path.link_to
Didn't it get removed? It was deprecated since 3.10.
How about replacing the reference with symlink_to
?
https://webknjaz.github.io/intersphinx-untangled/docs.python.org/
What might be better is to just hardcode the older URL for this specific link.
FYI it is entirely possible to add several intersphinx entries against different python version docs.
TBF this isn't really needed anymore due to fixes elsewhere, but this also (should, IIRC RTD releases on Tuesdays) bumps our builder to 3.12.
We should wait until RTD does run on 3.12 - link_to
will probably disappear at that point. What we could do is add some special case code to _path.py
- if sphinx is in sys.modules or an environment var is set, unconditionally define the method?
Only one issue from read the docs build:
src/trio/__init__.py:docstring of trio.Path:1: WARNING: py:obj reference target not found: .
Yeah I'm not sure if I even want to merge this PR anymore because it brings up so many possible issues (such as old forwarded methods not appearing in documentation). I'll just set it to WIP for a bit at least.
(such as old forwarded methods not appearing in documentatio
old forwarded issues are relatively straightforward to add exceptions for in add_mapping
in docs/source/conf.py
now. Though Buffer
is failing here now