Skip to content
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

gh-101100: Fix Sphinx warnings in c-api/float.rst #113494

Closed
wants to merge 1 commit into from

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Dec 26, 2023

Fix these warnings by documenting the constant:

Doc/c-api/float.rst:109: WARNING: c:macro reference target not found: PY_BIG_ENDIAN
Doc/c-api/float.rst:140: WARNING: c:macro reference target not found: PY_BIG_ENDIAN

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

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you document PY_BIG_ENDIAN, you should also document PY_LITTLE_ENDIAN.

And I think that float.rst is a wrong place for this. They have little relation to floats. Actually, the endianess of floating point representation can be different from the endianess of integer representation (see DOUBLE_IS_BIG_ENDIAN_IEEE754, DOUBLE_IS_LITTLE_ENDIAN_IEEE754 and DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754).

@hugovk
Copy link
Member Author

hugovk commented Dec 27, 2023

Good point, these constants are defined in pyport.h, nothing to do with floats.

What do you recommend?

  • Document the constants elsewhere - where?
  • Silence these warnings with !
  • Keep the warnings

@serhiy-storchaka
Copy link
Member

I do not know what is the best place for them, this is why they are still not documented. I suggest to leave this as is, until we found good place (many other macros are not documented).

@hugovk
Copy link
Member Author

hugovk commented Dec 27, 2023

Fine by me, let's tackle these later. Thanks for the review!

@hugovk hugovk closed this Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review docs Documentation in the Doc dir needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants