Skip to content

Commit

Permalink
depend: fix suppression of api-ms-win-*.dll warnings on Windows 11
Browse files Browse the repository at this point in the history
Fix suppression of warnings about unresolvable UCRT DLLs (i.e.,
the `api-ms-win-*.dll` files) on Windows 11, which was previously
enabled only for Windows 10.
  • Loading branch information
rokm committed Feb 29, 2024
1 parent 06c2f23 commit 5a9eeaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions PyInstaller/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@

is_win = sys.platform.startswith('win')
is_win_10 = is_win and (platform.win32_ver()[0] == '10')
is_win_11 = is_win and (platform.win32_ver()[0] == '11')
is_win_wine = False # Running under Wine; determined later on.
is_cygwin = sys.platform == 'cygwin'
is_darwin = sys.platform == 'darwin' # Mac OS X
Expand Down
4 changes: 2 additions & 2 deletions PyInstaller/depend/dylib.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ def include_library(libname):
if compat.is_linux:
_warning_suppressions.append(r'ldd')

# Suppress false warnings on win 10 and UCRT (see issue #1566).
if compat.is_win_10:
# Suppress warnings about unresolvable UCRT DLLs (see issue #1566) on Windows 10 and 11.
if compat.is_win_10 or compat.is_win_11:
_warning_suppressions.append(r'api-ms-win-.*\.dll')


Expand Down
2 changes: 2 additions & 0 deletions news/8339.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(Windows) Suppress warnings about unresolvable UCRT DLLs
(``api-ms-win-*.dll``) on Windows 11.

1 comment on commit 5a9eeaf

@roidelfin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you use this? I have compatability issues regarding pyinstaller on Windows 11.

Please sign in to comment.