Issue #19569: Compiler warnings are now emitted if use most of deprec… · pythoncapi/cpython@460bd0d · GitHub
Skip to content

Commit 460bd0d

Browse files
Issue python#19569: Compiler warnings are now emitted if use most of deprecated
functions.
1 parent 6107f46 commit 460bd0d

18 files changed

Lines changed: 143 additions & 142 deletions

Include/abstract.h

Lines changed: 8 additions & 4 deletions

Include/ceval.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ PyAPI_FUNC(void) PyEval_InitThreads(void);
182182
#ifndef Py_LIMITED_API
183183
PyAPI_FUNC(void) _PyEval_FiniThreads(void);
184184
#endif /* !Py_LIMITED_API */
185-
PyAPI_FUNC(void) PyEval_AcquireLock(void);
186-
PyAPI_FUNC(void) PyEval_ReleaseLock(void);
185+
PyAPI_FUNC(void) PyEval_AcquireLock(void) Py_DEPRECATED(3.2);
186+
PyAPI_FUNC(void) PyEval_ReleaseLock(void) /* Py_DEPRECATED(3.2) */;
187187
PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
188188
PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
189189
PyAPI_FUNC(void) PyEval_ReInitThreads(void);

Include/longobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ PyAPI_FUNC(long long) PyLong_AsLongLongAndOverflow(PyObject *, int *);
9494

9595
PyAPI_FUNC(PyObject *) PyLong_FromString(const char *, char **, int);
9696
#ifndef Py_LIMITED_API
97-
PyAPI_FUNC(PyObject *) PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int);
97+
PyAPI_FUNC(PyObject *) PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int) Py_DEPRECATED(3.3);
9898
PyAPI_FUNC(PyObject *) PyLong_FromUnicodeObject(PyObject *u, int base);
9999
PyAPI_FUNC(PyObject *) _PyLong_FromBytes(const char *, Py_ssize_t, int);
100100
#endif

Include/moduleobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PyAPI_FUNC(PyObject *) PyModule_New(
2121
PyAPI_FUNC(PyObject *) PyModule_GetDict(PyObject *);
2222
PyAPI_FUNC(PyObject *) PyModule_GetNameObject(PyObject *);
2323
PyAPI_FUNC(const char *) PyModule_GetName(PyObject *);
24-
PyAPI_FUNC(const char *) PyModule_GetFilename(PyObject *);
24+
PyAPI_FUNC(const char *) PyModule_GetFilename(PyObject *) Py_DEPRECATED(3.2);
2525
PyAPI_FUNC(PyObject *) PyModule_GetFilenameObject(PyObject *);
2626
#ifndef Py_LIMITED_API
2727
PyAPI_FUNC(void) _PyModule_Clear(PyObject *);

Include/pyerrors.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(
240240
);
241241
#if defined(MS_WINDOWS) && !defined(Py_LIMITED_API)
242242
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename(
243-
PyObject *, const Py_UNICODE *);
243+
PyObject *, const Py_UNICODE *) Py_DEPRECATED(3.3);
244244
#endif /* MS_WINDOWS */
245245

246246
PyAPI_FUNC(PyObject *) PyErr_Format(
@@ -274,7 +274,7 @@ PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
274274
#ifndef Py_LIMITED_API
275275
/* XXX redeclare to use WSTRING */
276276
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithUnicodeFilename(
277-
int, const Py_UNICODE *);
277+
int, const Py_UNICODE *) Py_DEPRECATED(3.3);
278278
#endif
279279
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
280280
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
@@ -288,7 +288,7 @@ PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
288288
);
289289
#ifndef Py_LIMITED_API
290290
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithUnicodeFilename(
291-
PyObject *,int, const Py_UNICODE *);
291+
PyObject *,int, const Py_UNICODE *) Py_DEPRECATED(3.3);
292292
#endif
293293
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
294294
#endif /* MS_WINDOWS */
@@ -391,7 +391,7 @@ PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_Create(
391391
Py_ssize_t start,
392392
Py_ssize_t end,
393393
const char *reason /* UTF-8 encoded string */
394-
);
394+
) Py_DEPRECATED(3.3);
395395
#endif
396396

397397
/* create a UnicodeTranslateError object */
@@ -402,7 +402,7 @@ PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_Create(
402402
Py_ssize_t start,
403403
Py_ssize_t end,
404404
const char *reason /* UTF-8 encoded string */
405-
);
405+
) Py_DEPRECATED(3.3);
406406
PyAPI_FUNC(PyObject *) _PyUnicodeTranslateError_Create(
407407
PyObject *object,
408408
Py_ssize_t start,

Include/unicodeobject.h

Lines changed: 36 additions & 32 deletions

0 commit comments

Comments
 (0)