This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrei.avk
Recipients andrei.avk, docs@python, kj
Date 2021-07-27.02:26:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Something changed between 3.8 and 3.9 so that "bare" references to methods on `object` no longer get linked. So for example, :meth:`__bool__` would get link to object.__bool__ anchor, but in 3.9+, it should be :meth:`~object.__bool__` for the link to be generated.

The case of __enter__ and __exit__ is that inside of contextmanager block, Sphinx knows that bare ref should link to contextmanager, but outside of the block, it does not, so no link is created.

In 3.8 docs, there are bare refs to __enter__ and __exit__ outside of relevant block, so they link to object.__enter__ and object.__exit__, which is of course wrong.

See 2nd paragraph below the block:

I wasn't able to find why or how in 3.8 it was configured to auto-link bare refs to `object`. I looked at make.bat, and

Perhaps in 3.8 the entire file was considered / configured a block for `object` object?

I will make a PR to fix the links.
Date User Action Args
2021-07-27 02:26:16andrei.avksetrecipients: + andrei.avk, docs@python, kj
2021-07-27 02:26:16andrei.avksetmessageid: <>
2021-07-27 02:26:16andrei.avklinkissue42182 messages
2021-07-27 02:26:15andrei.avkcreate