theislab / scanpydoc

Collection of Sphinx extensions similar to (but more flexible than) numpydoc
https://icb-scanpydoc.readthedocs-hosted.com/en/latest/
GNU General Public License v3.0
12 stars 6 forks source link

`DLTypedField` incompatible with sphinx 4.1.0 #35

Closed ivirshup closed 3 years ago

ivirshup commented 3 years ago

Discovered here: https://github.com/theislab/scanpy/issues/1946

Sphinx 4.1.0 seems to have updated the API for Fields. I don't know if this is meant to be an external API, so can't say whether this is bad behavior on their part. Regardless, it makes these fields not work with sphinx.

ivirshup commented 3 years ago

I think we could get this to work by adding inliner and location kwargs to DLTypedField.make_field, and passing these through to make_xrefs. However I'm not quite sure what these arguments actually are, so that would be worth figuring out before making the change.

flying-sheep commented 3 years ago

We just pass them on to make_xref. Since we get cheap backwards compat that way, I just added them as **kw in #36

Regarding their purpose: A cursory glance suggests they’re for customizing automatic URL detection, and maybe other stuff like it.