-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add deprecation decorator and comments for pywin32 #11570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
JelleZijlstra
merged 11 commits into
python:main
from
Avasam:pywin32-deprecation-messages
Mar 11, 2024
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
68eeebf
TODO: LARGE_INTEGER
Avasam c1e82d5
LARGE_INTEGER & ULARGE_INTEGER deprecation
Avasam 4b340e3
Merge branch 'main' of https://github.com/python/typeshed into pywin3…
Avasam 0fd060a
Reduce stubtest allowlist entries
Avasam d5033d2
Keep all deprecated first
Avasam 9b522b1
Address PR comments
Avasam 3fba6e1
reorder overload
Avasam 9ff7c0c
Update stubs/pywin32/_win32typing.pyi
Avasam d8fd8bc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ffaf31a
Update stubs/pywin32/_win32typing.pyi
Avasam 631868a
Update stubs/pywin32/win32/lib/win32pdhquery.pyi
Avasam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from _typeshed import Incomplete, ReadableBuffer | ||
from collections.abc import Callable, Iterable | ||
from typing import TypedDict | ||
from typing_extensions import deprecated | ||
|
||
import _win32typing | ||
from win32.lib.pywintypes import error as error | ||
|
@@ -111,8 +112,10 @@ def GetModuleFileName(hModule: int, /) -> str: ... | |
def GetModuleFileNameW(hModule: int, /) -> str: ... | ||
def GetModuleHandle(fileName: str | None = ..., /) -> int: ... | ||
def GetPwrCapabilities(): ... | ||
@deprecated("This function is obsolete, applications should use the registry instead.") | ||
def GetProfileSection(section: str, iniName: str | None = ..., /): ... | ||
def GetProcAddress(hModule: int, functionName: _win32typing.PyResourceId, /): ... | ||
@deprecated("This function is obsolete, applications should use the registry instead.") | ||
def GetProfileVal(section: str, entry: str, defValue: str, iniName: str | None = ..., /) -> str: ... | ||
def GetShortPathName(path: str, /) -> str: ... | ||
def GetStdHandle(handle: int, /) -> _win32typing.PyHANDLE: ... | ||
|
@@ -223,6 +226,7 @@ def SetSysColors(Elements, RgbValues, /) -> None: ... | |
def SetLocalTime(SystemTime: _win32typing.PyTime, /) -> None: ... | ||
def SetSystemTime(year, month, dayOfWeek, day, hour, minute, second, millseconds, /): ... | ||
def SetClassLong(hwnd: int, offset, val, /): ... | ||
@deprecated("This function is obsolete, use `win32api.SetClassLong` instead") | ||
def SetClassWord(hwnd: int, offset, val, /): ... | ||
def SetCursor(hCursor: int, /) -> int: ... | ||
def SetEnvironmentVariable(Name, Value, /) -> None: ... | ||
|
@@ -233,6 +237,11 @@ def SetSystemPowerState(Suspend, Force, /) -> None: ... | |
def SetThreadLocale(lcid, /) -> None: ... | ||
def SetTimeZoneInformation(tzi, /): ... | ||
def SetWindowLong(hwnd: int | None, offset: int, value: float, /) -> int: ... | ||
|
||
# This method is accidentally overwritten in source, can re-introduce once fixed: | ||
# https://github.com/mhammond/pywin32/pull/2199 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
# @deprecated("This function is obsolete, use `win32api.SetWindowLong` instead") | ||
# def SetWindowWord(hwnd, offset: int, val: int) -> int: ... | ||
def ShellExecute(hwnd: int, op: str, file: str, params: str, _dir: str, bShow, /): ... | ||
def ShowCursor(show, /): ... | ||
def Sleep(time, bAlterable: int = ..., /): ... | ||
|
@@ -250,7 +259,9 @@ def UpdateResource( | |
def VkKeyScan(char, char1, /): ... | ||
def WinExec(cmdLine: str, arg, /) -> None: ... | ||
def WinHelp(hwnd: int, hlpFile: str, cmd, data: str | int = ..., /) -> None: ... | ||
@deprecated("This function is obsolete, applications should use the registry instead.") | ||
def WriteProfileSection(section: str, data: str, iniName: str | None = ..., /): ... | ||
@deprecated("This function is obsolete, applications should use the registry instead.") | ||
def WriteProfileVal(section: str, entry: str, value: str, iniName: str | None = ..., /) -> None: ... | ||
def HIBYTE(val: int, /) -> int: ... | ||
def LOBYTE(val: int, /) -> int: ... | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.