trio icon indicating copy to clipboard operation
trio copied to clipboard

Bump RTD builder Python version

Open A5rocks opened this issue 1 year ago • 14 comments

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.

A5rocks avatar Oct 09 '23 22:10 A5rocks

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           

codecov[bot] avatar Oct 09 '23 22:10 codecov[bot]

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...

TeamSpen210 avatar Oct 09 '23 23:10 TeamSpen210

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

A5rocks avatar Oct 10 '23 00:10 A5rocks

I've gone ahead and submitted https://github.com/readthedocs/readthedocs.org/pull/10808 which might help things along

A5rocks avatar Oct 10 '23 03:10 A5rocks

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.

TeamSpen210 avatar Oct 11 '23 00:10 TeamSpen210

That sounds like a plan. I'm not comfortable enough with Sphinx to do that though... maybe you could? :P

A5rocks avatar Oct 11 '23 01:10 A5rocks

/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.

webknjaz avatar Oct 12 '23 23:10 webknjaz

How about replacing the reference with symlink_to?

https://webknjaz.github.io/intersphinx-untangled/docs.python.org/

webknjaz avatar Oct 12 '23 23:10 webknjaz

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.

webknjaz avatar Oct 12 '23 23:10 webknjaz

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.

A5rocks avatar Oct 17 '23 23:10 A5rocks

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?

TeamSpen210 avatar Oct 17 '23 23:10 TeamSpen210

Only one issue from read the docs build:

src/trio/__init__.py:docstring of trio.Path:1: WARNING: py:obj reference target not found: .

CoolCat467 avatar Dec 18 '23 23:12 CoolCat467

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.

A5rocks avatar Dec 19 '23 06:12 A5rocks

(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

jakkdl avatar Dec 23 '23 13:12 jakkdl