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.

classification
Title: expose _CrtSetReportMode via the msvcrt module
Type: enhancement Stage: needs patch
Components: Windows Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: mhammond Nosy List: amaury.forgeotdarc, brian.curtin, mhammond
Priority: normal Keywords: 26backport

Created on 2009-01-31 06:52 by mhammond, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
msvcrt_crtsetreportmode.patch mhammond, 2009-01-31 06:52 Adds msvcrt.SetCrtReportMode()
Messages (4)
msg80858 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2009-01-31 06:52
In bug 4804, there is some debate about how desirable it is for Python
to unconditionally disable all CRT assertions on Windows - however,
there is agreement that exposing the ability to enable and disable these
assertions via the msvcrt module is reasonable - so I'm attaching a
patch for exactly that.  I'd also like to nominate this for the 2.6 and
py3k branches.
msg96830 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-12-23 02:27
Has there been any consensus about what to do with this? I know there
was some chatter on python-dev about assertions causing problems with
buildbots (6 months ago?) but I don't think anything came out of it.

The code change is small and looks good. Is it worth extending this to
expose CrtSetReportFile since a file is one of the options of
CrtSetReportMode?
msg96894 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-12-26 22:03
_CrtSetReportMode() is exposed without the leading underscore. IMO the 
_CRT_WARN and other constants should be renamed the same way.
msg97015 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2009-12-30 00:14
I just noticed that this already exists in py3k, added in r57823 (lacks
docs but I'll cover them in the py3k fix for #7579)
History
Date User Action Args
2022-04-11 14:56:45adminsetgithub: 49366
2010-07-10 23:00:29terry.reedysetstatus: open -> closed
resolution: out of date
2010-01-13 03:00:26brian.curtinsetkeywords: + 26backport, - patch, patch, needs review
stage: needs patch
versions: - Python 3.0, Python 3.1
2009-12-30 00:14:29brian.curtinsetmessages: + msg97015
2009-12-26 22:03:11amaury.forgeotdarcsetkeywords: patch, patch, needs review
nosy: + amaury.forgeotdarc
messages: + msg96894

2009-12-23 02:27:15brian.curtinsetnosy: + brian.curtin
messages: + msg96830
2009-01-31 06:53:20mhammondsetkeywords: patch, patch, needs review
components: + Windows
2009-01-31 06:52:53mhammondcreate