Skip to content

gh-74481: add missing docs and costs in msvcrt #109650

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

Merged
merged 4 commits into from
Sep 21, 2023
Merged

Conversation

aisk
Copy link
Contributor

@aisk aisk commented Sep 21, 2023

Previous discuss: #74481 (comment):

msvcrt set_error_mode, CrtReportMode, CrtReportFile and the associated CRT constants should be documented for use with debug builds. Also, msvcrt is missing the set_error_mode constants _OUT_TO_DEFAULT, _OUT_TO_STDERR, _OUT_TO_MSGBOX, and _REPORT_ERRMODE.

SetErrorMode 1 and the SEM_* constants are defined in msvcrt, for convenience I suppose. They're not related to the CRT. I think they should be aliased in the os module and documented there. GetErrorMode 2 can also be provided in Python 3.5+. It would be useful to also provide SetThreadErrorMode 3 and GetThreadErrorMode conditionally in Windows 7+, which is practically all Windows users nowadays.

This PR finished it, except the SetErrorMode function and related constants alias to os module. I think it should be finished in another PR.

And also removed the duplicated white spaces in this document.


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

@aisk aisk requested a review from a team as a code owner September 21, 2023 14:16
@zooba zooba merged commit 869f177 into python:main Sep 21, 2023
@aisk aisk deleted the update-msvcrt-docs branch September 21, 2023 15:47
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
@encukou encukou added the needs backport to 3.12 only security fixes label May 8, 2024
@miss-islington-app
Copy link

Thanks @aisk for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app
Copy link

Sorry, @aisk and @zooba, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 869f177b5cd5c2a2a015e4658cbbb0e9566210f7 3.12

@encukou encukou removed the needs backport to 3.12 only security fixes label May 8, 2024
@encukou
Copy link
Member

encukou commented May 8, 2024

I misclicked, sorry for the noise.

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@python python deleted a comment from bedevere-bot Feb 24, 2025
@python python deleted a comment from bedevere-bot Feb 24, 2025
@python python deleted a comment from bedevere-bot Feb 24, 2025
@python python deleted a comment from bedevere-bot Feb 24, 2025
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.

3 participants