Skip to content

bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls#14462

Merged
zooba merged 1 commit into
python:masterfrom
ZackerySpytz:bpo-37445-FormatMessageW-flags
Sep 9, 2019
Merged

bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls#14462
zooba merged 1 commit into
python:masterfrom
ZackerySpytz:bpo-37445-FormatMessageW-flags

Conversation

@ZackerySpytz

@ZackerySpytz ZackerySpytz commented Jun 29, 2019

Copy link
Copy Markdown
Contributor

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag
without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are
insert sequences in the message definition.

https://bugs.python.org/issue37445

…calls

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag
without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are
insert sequences in the message definition.
@ZackerySpytz

Copy link
Copy Markdown
Contributor Author

A test similar to test_winerror() in ctypes/test/test_win32.py could be added for this (to test ctypes.FormatError()), though it would be flimsy to test the content of the error message.

@mangrisano

Copy link
Copy Markdown
Contributor

/cc @encukou @ncoghlan @pitrou

@encukou

encukou commented Jul 1, 2019

Copy link
Copy Markdown
Member

@mangrisano Not sure what I can do here; I'm not familiar with Windows.

@zooba
zooba merged commit a656365 into python:master Sep 9, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2019
…calls (pythonGH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a656365)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-15742 is a backport of this pull request to the 3.8 branch.

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ZackerySpytz for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-15743 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2019
…calls (pythonGH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a656365)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
miss-islington added a commit that referenced this pull request Sep 9, 2019
…calls (GH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a656365)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
miss-islington added a commit that referenced this pull request Sep 9, 2019
…calls (GH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
(cherry picked from commit a656365)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
ZackerySpytz added a commit to ZackerySpytz/cpython that referenced this pull request Sep 10, 2019
…calls (pythonGH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag
without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are
insert sequences in the message definition.
(cherry picked from commit a656365)
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
…calls (pythonGH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
…calls (pythonGH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
…calls (pythonGH-14462)

If FormatMessageW() is passed the FORMAT_MESSAGE_FROM_SYSTEM flag without FORMAT_MESSAGE_IGNORE_INSERTS, it will fail if there are insert sequences in the message definition.
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.

7 participants