-
Notifications
You must be signed in to change notification settings - Fork 845
Closed
Description
For all bugs, please provide the following information:
Expected behavior and actual behavior
It looks like there's a bunch of names missing in win32com.shell.shell in the last release. Here's the full list as found by stubtest when updating the typeshed stubs:
win32com.shell.shell.CLSID_ApplicationDestinations
win32com.shell.shell.CLSID_ApplicationDocumentLists
win32com.shell.shell.CLSID_DestinationList
win32com.shell.shell.CLSID_EnumerableObjectCollection
win32com.shell.shell.CLSID_ShellLibrary
win32com.shell.shell.FOLDERID_DeviceMetadataStore
win32com.shell.shell.FOLDERID_DocumentsLibrary
win32com.shell.shell.FOLDERID_HomeGroup
win32com.shell.shell.FOLDERID_ImplicitAppShortcuts
win32com.shell.shell.FOLDERID_Libraries
win32com.shell.shell.FOLDERID_MusicLibrary
win32com.shell.shell.FOLDERID_PicturesLibrary
win32com.shell.shell.FOLDERID_PublicLibraries
win32com.shell.shell.FOLDERID_PublicRingtones
win32com.shell.shell.FOLDERID_RecordedTVLibrary
win32com.shell.shell.FOLDERID_Ringtones
win32com.shell.shell.FOLDERID_UserPinned
win32com.shell.shell.FOLDERID_UserProgramFiles
win32com.shell.shell.FOLDERID_UserProgramFilesCommon
win32com.shell.shell.FOLDERID_UsersLibraries
win32com.shell.shell.FOLDERID_VideosLibrary
win32com.shell.shell.FOLDERTYPEID_Communications
win32com.shell.shell.FOLDERTYPEID_Generic
win32com.shell.shell.FOLDERTYPEID_GenericLibrary
win32com.shell.shell.FOLDERTYPEID_GenericSearchResults
win32com.shell.shell.FOLDERTYPEID_Music
win32com.shell.shell.FOLDERTYPEID_OpenSearch
win32com.shell.shell.FOLDERTYPEID_OtherUsers
win32com.shell.shell.FOLDERTYPEID_PublishedItems
win32com.shell.shell.FOLDERTYPEID_RecordedTV
win32com.shell.shell.FOLDERTYPEID_SavedGames
win32com.shell.shell.FOLDERTYPEID_SearchConnector
win32com.shell.shell.FOLDERTYPEID_SearchHome
win32com.shell.shell.FOLDERTYPEID_Searches
win32com.shell.shell.FOLDERTYPEID_StartMenu
win32com.shell.shell.FOLDERTYPEID_UsersLibraries
win32com.shell.shell.FOLDERTYPEID_Videos
win32com.shell.shell.IID_IApplicationDestinations
win32com.shell.shell.IID_IApplicationDocumentLists
win32com.shell.shell.IID_ICustomDestinationList
win32com.shell.shell.IID_IEnumObjects
win32com.shell.shell.IID_IObjectArray
win32com.shell.shell.IID_IObjectCollection
win32com.shell.shell.IID_IShellLibrary
They have in common that they are locked behind a #if WINVER >= 0x0601 directive. Which is defined like this in sdkddkver.h:
#ifndef WINVER
#ifdef _WIN32_WINNT
// set WINVER based on _WIN32_WINNT
#define WINVER _WIN32_WINNT
#else
#define WINVER 0x0A00
#endif
#endif
In #2422 , we declared our minimal supported Windows version on builds to be 0x0600 (Vista / Windows Server 2008). So it makes sense that globally shared builds wouldn't add those symbols for compatibility.
Potential solutions:
- Remove the condition if these don't actually need to be conditional (meaning the build would still succeed even if unusable on Vista)
- Drop Vista support. (which also makes the conditionals redundant.
Steps to reproduce the problem
>>> from win32com.shell.shell import CLSID_ApplicationDestinations
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
from win32com.shell.shell import CLSID_ApplicationDestinations
ImportError: cannot import name 'CLSID_ApplicationDestinations' from 'win32com.shell.shell' (E:\Users\Avasam\Documents\Git\typeshed\.venv\Lib\site-packages\win32comext\shell\shell.pyd)System information
Python version and distribution: CPython 3.13
pywin32 version: 309
Windows Version: Version 10.0.19045 Build 19045 (although this is more of a build issue)
DLL locations: N/A
Metadata
Metadata
Assignees
Labels
No labels