Skip to content

Conversation

Lincoln-developer
Copy link
Contributor

@Lincoln-developer Lincoln-developer commented Nov 5, 2024

This pull request adds documentation for the -R flag in the python -m test command, enabling reference leak checking. This feature helps developers identify memory leaks when modifying C code.


📚 Documentation preview 📚: https://cpython-devguide--1468.org.readthedocs.build/

@encukou
Copy link
Member

encukou commented Nov 6, 2024

Thank you for the addition!
When first learning about -R, you aren't likely to know what values to use for <warmups> and <repeats>. So, I think it would be good if the first paragraph, and the example, used the defaults, which are specified (somewhat unusually) with a lone colon after the -R: python -m test <test_name> -R :

A follow-up paragraph can then mention specifying <warmups> and <repeats> explicitly (which would help explain what the : is for).

@Lincoln-developer
Copy link
Contributor Author

Lincoln-developer commented Nov 6, 2024

Thank you for the addition! When first learning about -R, you aren't likely to know what values to use for <warmups> and <repeats>. So, I think it would be good if the first paragraph, and the example, used the defaults, which are specified (somewhat unusually) with a lone colon after the -R: python -m test <test_name> -R :

A follow-up paragraph can then mention specifying <warmups> and <repeats> explicitly (which would help explain what the : is for).

Thank you @encukou for the insight sighted out, let me work on these changes to have a more clear view of this context.

@encukou
Copy link
Member

encukou commented Dec 11, 2024

Sorry for dropping the ball here! I'll merge with a few small adjustments.
Thank you for the contribution, @Lincoln-developer!

@encukou encukou merged commit 0b9001f into python:main Dec 12, 2024
4 checks passed
@Lincoln-developer
Copy link
Contributor Author

Sorry for dropping the ball here! I'll merge with a few small adjustments. Thank you for the contribution, @Lincoln-developer!

Thank you for reviewing and merging this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants