Skip to content

gh-101100: Fix Sphinx warnings in library/email.compat32-message.rst #136323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LamentXU123
Copy link
Contributor

@LamentXU123 LamentXU123 commented Jul 5, 2025

before:

C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:226: WARNING: py:class reference target not found: email.emailmessage.EmailMessage [ref.class]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:238: WARNING: py:class reference target not found: email.emailmessage.EmailMessage [ref.class]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:267: WARNING: py:class reference target not found: email.emailmessage.EmailMessage [ref.class]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:267: WARNING: py:meth reference target not found: email.emailmessage.EmailMessage.set_content [ref.meth]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:278: WARNING: py:class reference target not found: email.emailmessage.EmailMessage [ref.class]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:488: WARNING: py:class reference target not found: email.emailmessage.EmailMessage [ref.class]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:526: WARNING: py:class reference target not found: email.emailmessage.EmailMessage [ref.class]
C:\Users\admin\Downloads\cpython-main\Doc\library\email.compat32-message.rst:581: WARNING: py:class reference target not found: email.emailmessage.EmailMessage [ref.class]

The warnings are raised in a same reason. An example:

      This is a legacy method.  On the
      :class:`~email.emailmessage.EmailMessage` class its functionality is
      replaced by :meth:`~email.message.EmailMessage.get_content` and
      :meth:`~email.message.EmailMessage.iter_parts`.

image

The referrence to EmailMessage is invalid, because the moudle is actually email.message.EmailMessage not email.emailmessage.EmailMessage . This PR fix them all.

After:

image

and the example:

image

In this example, you can check the set_content method, which is a method of email.message.EmailMessage not email.emailmessage.EmailMessage

The preview doc of this moudle: https://cpython-previews--136323.org.readthedocs.build/en/136323/library/email.compat32-message.html?readthedocs-diff=true&readthedocs-diff-chunk=1


📚 Documentation preview 📚: https://cpython-previews--136323.org.readthedocs.build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant