Skip to content

expose _CrtSetReportMode via the msvcrt module #49366

Closed

Description

@mhammond
BPO 5116
Nosy @mhammond, @amauryfa, @briancurtin
Files
  • msvcrt_crtsetreportmode.patch: Adds msvcrt.SetCrtReportMode()
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/mhammond'
    closed_at = <Date 2010-07-10.23:00:29.097>
    created_at = <Date 2009-01-31.06:52:53.037>
    labels = ['type-feature', 'OS-windows']
    title = 'expose _CrtSetReportMode via the msvcrt module'
    updated_at = <Date 2010-07-10.23:00:29.096>
    user = 'https://github.com/mhammond'

    bugs.python.org fields:

    activity = <Date 2010-07-10.23:00:29.096>
    actor = 'terry.reedy'
    assignee = 'mhammond'
    closed = True
    closed_date = <Date 2010-07-10.23:00:29.097>
    closer = 'terry.reedy'
    components = ['Windows']
    creation = <Date 2009-01-31.06:52:53.037>
    creator = 'mhammond'
    dependencies = []
    files = ['12903']
    hgrepos = []
    issue_num = 5116
    keywords = ['26backport']
    message_count = 4.0
    messages = ['80858', '96830', '96894', '97015']
    nosy_count = 3.0
    nosy_names = ['mhammond', 'amaury.forgeotdarc', 'brian.curtin']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'needs patch'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue5116'
    versions = ['Python 2.6', 'Python 2.7']

    Activity

    1. mhammond commented on Jan 31, 2009

      @mhammond
      ContributorAuthor

      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.

    2. self-assigned this
      on Jan 31, 2009
    3. briancurtin commented on Dec 23, 2009

      @briancurtin
      Member

      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?

    4. amauryfa commented on Dec 26, 2009

      @amauryfa
      Contributor

      _CrtSetReportMode() is exposed without the leading underscore. IMO the
      _CRT_WARN and other constants should be renamed the same way.

    5. briancurtin commented on Dec 30, 2009

      @briancurtin
      Member

      I just noticed that this already exists in py3k, added in r57823 (lacks
      docs but I'll cover them in the py3k fix for bpo-7579)

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions