Skip to content

Change PendingDeprecationWarning to DeprecationWarning #2503

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
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
4 changes: 2 additions & 2 deletions com/win32com/src/PythonCOM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -777,14 +777,14 @@ static PyObject *pythoncom_WrapObject(PyObject *self, PyObject *args)

static PyObject *pythoncom_MakeIID(PyObject *self, PyObject *args)
{
PyErr_Warn(PyExc_PendingDeprecationWarning, "MakeIID is deprecated - please use pywintypes.IID() instead.");
PyErr_Warn(PyExc_DeprecationWarning, "MakeIID is deprecated - please use pywintypes.IID() instead.");
return PyWinMethod_NewIID(self, args);
}

// no autoduck - this is deprecated.
static PyObject *pythoncom_MakeTime(PyObject *self, PyObject *args)
{
PyErr_Warn(PyExc_PendingDeprecationWarning, "MakeTime is deprecated - please use pywintypes.Time() instead.");
PyErr_Warn(PyExc_DeprecationWarning, "MakeTime is deprecated - please use pywintypes.Time() instead.");
return PyWinMethod_NewTime(self, args);
}

Expand Down
4 changes: 2 additions & 2 deletions win32/Lib/regcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import warnings

warnings.warn(
"The regcheck module has been pending deprecation since build 210",
category=PendingDeprecationWarning,
"The regcheck module has been deprecated and pending removal since build 210",
category=DeprecationWarning,
)

import os
Expand Down
4 changes: 2 additions & 2 deletions win32/src/PyLARGE_INTEGER.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BOOL PyWinObject_AsLARGE_INTEGER(PyObject *ob, LARGE_INTEGER *pResult)
return !(pResult->QuadPart == -1 && PyErr_Occurred());
}
else {
PyErr_Warn(PyExc_PendingDeprecationWarning,
PyErr_Warn(PyExc_DeprecationWarning,
"Support for passing 2 integers to create a 64bit value is deprecated - pass a long instead");
long hiVal, loVal;
if (!PyArg_ParseTuple(ob, "ll", &hiVal, &loVal)) {
Expand All @@ -50,7 +50,7 @@ BOOL PyWinObject_AsULARGE_INTEGER(PyObject *ob, ULARGE_INTEGER *pResult)
PyErr_SetString(PyExc_TypeError, "ULARGE_INTEGER must be 'int', or '(int, int)'");
return FALSE;
}
PyErr_Warn(PyExc_PendingDeprecationWarning,
PyErr_Warn(PyExc_DeprecationWarning,
"Support for passing 2 integers to create a 64bit value is deprecated - pass a long instead");
pResult->QuadPart = (((__int64)hiVal) << 32) | loVal;
return TRUE;
Expand Down
2 changes: 1 addition & 1 deletion win32/src/win32crypt/PyCERTSTORE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ PyObject *PyCERTSTORE::PyCertCloseStore(PyObject *self, PyObject *args, PyObject
return NULL;
}
if (dwFlags != (DWORD)-1) {
PyErr_Warn(PyExc_PendingDeprecationWarning,
PyErr_Warn(PyExc_DeprecationWarning,
"The Flags param to CertCloseStore is deprecated; a non-zero value is likely to crash");
}
BOOL bsuccess;
Expand Down
2 changes: 1 addition & 1 deletion win32/src/win32gui.i
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ static PyObject *PyGetObjectType(PyObject *self, PyObject *args)

static PyObject *PyMakeBuffer(PyObject *self, PyObject *args)
{
PyErr_Warn(PyExc_PendingDeprecationWarning, "PyMakeBuffer is deprecated; use PyGetMemory instead");
PyErr_Warn(PyExc_DeprecationWarning, "PyMakeBuffer is deprecated; use PyGetMemory instead");
size_t len;
void *addr=NULL;
#ifdef _WIN64
Expand Down