Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions stubs/pywin32/@tests/stubtest_allowlist_win32.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Not available at runtime. Contains type definitions that are otherwise not exposed
_win32typing

# False-positive, stubtest shouldn't want to expose TYPE_CHECKING
(win32\.lib\.)?pywintypes\.TYPE_CHECKING
Comment on lines +4 to +5
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Surely stubtest shouldn't be considering a simple from typing import TYPE_CHECKING as wanting to re-export that symbol? (which has somewhat special meaning). It's not even that the symbol is unused (which could be interpreted as meant to be re-exposed).

https://github.com/mhammond/pywin32/blob/main/win32/Lib/pywintypes.py

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yeah, that's weird. Normally only from X import Y as Y (and items in __all__) should be considered for reexports.


# PyWin tool / debugger
pythonwin.start_pythonwin
pythonwin.pywin.*
Expand Down Expand Up @@ -28,29 +31,21 @@ win32com(ext)?.axscript.client.scriptdispatch
win32com.demos.*
win32com.servers.test_pycomtest
win32com.test.*
win32com(ext)?.axdebug.codecontainer
win32com(ext)?.axdebug.dump
win32com(ext)?.axdebug.debugger
win32com(ext)?.axscript.client.pydumper
win32com(ext)?.directsound.test.*

# Deprecated and makes a buffer of random junk. Use something like `b"\x00" * bufferSize` instead
# It's safer to not even expose this method as deprecated.
(win32.)?win32gui.PyMakeBuffer

# Axdebug is not built on Python 3.11 anyway: https://github.com/mhammond/pywin32/blob/c0f06cf49252b4848d0c74832247280291b00b03/setup.py#L386-L390
#
# failed to import, ImportError: DLL load failed while importing axdebug: The specified module could not be found.
win32com(ext)?.axdebug.adb
win32com(ext)?.axdebug.axdebug
win32com(ext)?.axdebug.codecontainer
# failed to import, ModuleNotFoundError: No module named 'gateways'
win32com(ext)?.axdebug.contexts
# failed to import, ModuleNotFoundError: No module named 'axdebug'
win32com(ext)?.axdebug.adb
win32com(ext)?.axdebug.debugger
win32com(ext)?.axdebug.documents
win32com(ext)?.axdebug.expressions
# failed to import, ModuleNotFoundError: No module named 'expressions'
win32com(ext)?.axdebug.stackframe
# failed to import, ImportError: cannot import name 'axdebug' from 'win32com.axdebug'
win32com(ext)?.axdebug.gateways
win32com(ext)?.axscript.client.debug
win32com(ext)?.axdebug.stackframe
2 changes: 1 addition & 1 deletion stubs/pywin32/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "311.*"
version = "312.*"
upstream-repository = "https://github.com/mhammond/pywin32"

[tool.stubtest]
Expand Down
11 changes: 11 additions & 0 deletions stubs/pywin32/_win32typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6312,3 +6312,14 @@ class HTTP_FILTER_VERSION:
def Flags(self): ...
@property
def FilterDesc(self) -> str: ...

class PySYSTEM_CPU_SET_INFORMATION:
Id: int
Group: int
LogicalProcessorIndex: int
CoreIndex: int
LastLevelCacheIndex: int
NumaNodeIndex: int
EfficiencyClass: int
SchedulingClass: int
AllocationTag: int
1 change: 1 addition & 0 deletions stubs/pywin32/pythoncom.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -496,4 +496,5 @@ fdexPropCannotPutRef: int
fdexPropCannotSourceEvents: int
fdexPropDynamicType: int
fdexPropNoSideEffects: int
# Deprecated: Use `getattr(sys, "frozen", False)` directly instead.
frozen: int
1 change: 0 additions & 1 deletion stubs/pywin32/pythonwin/win32ui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ IDC_TABTIMMY_NONE: int
IDC_VIEW_EOL: int
IDC_VIEW_INDENTATIONGUIDES: int
ID_VIEW_FOLD_TOPLEVEL: int
UNICODE: int
copyright: str
dllhandle: int
types: dict[str, type]
3 changes: 0 additions & 3 deletions stubs/pywin32/win32/lib/win32con.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2102,9 +2102,6 @@ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: Final = 8192
FILE_ATTRIBUTE_ENCRYPTED: Final = 16384
FILE_ATTRIBUTE_VIRTUAL: Final = 65536

FILE_ATTRIBUTE_ATOMIC_WRITE: Final = 512
FILE_ATTRIBUTE_XACTION_WRITE: Final = 1024

FILE_NOTIFY_CHANGE_FILE_NAME: Final = 1
FILE_NOTIFY_CHANGE_DIR_NAME: Final = 2
FILE_NOTIFY_CHANGE_ATTRIBUTES: Final = 4
Expand Down
1 change: 1 addition & 0 deletions stubs/pywin32/win32/win32api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def GetProfileVal(section: str, entry: str, defValue: str, iniName: str | None =
def GetShortPathName(path: str, /) -> str: ...
def GetStdHandle(handle: int, /) -> int: ...
def GetSysColor(index: int, /) -> int: ...
def GetSystemCpuSetInformation() -> list[_win32typing.PySYSTEM_CPU_SET_INFORMATION]: ...
def GetSystemDefaultLangID() -> int: ...
def GetSystemDefaultLCID() -> int: ...
def GetSystemDirectory() -> str: ...
Expand Down
1 change: 0 additions & 1 deletion stubs/pywin32/win32/win32clipboard.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,3 @@ CF_TEXT: Final[int]
CF_TIFF: Final[int]
CF_UNICODETEXT: Final[int]
CF_WAVE: Final[int]
UNICODE: bool
2 changes: 1 addition & 1 deletion stubs/pywin32/win32/win32gui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -557,5 +557,5 @@ TPM_RIGHTALIGN: int
TPM_RIGHTBUTTON: int
TPM_TOPALIGN: int
TPM_VCENTERALIGN: int
UNICODE: Literal[True]
UNICODE: Literal[1]
dllhandle: int
2 changes: 0 additions & 2 deletions stubs/pywin32/win32comext/axdebug/codecontainer.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from _typeshed import Incomplete

name: str

class SourceCodeContainer:
sourceContext: Incomplete
text: Incomplete
Expand Down
Loading