[New-bugs-announce] [issue37588] Py_DEPRECATED and unavoidable warnings

Phil Thompson report at bugs.python.org
Sat Jul 13 13:53:56 EDT 2019


New submission from Phil Thompson <phil at riverbankcomputing.com>:

I have a number of static PyTypeObject declarations. In order to avoid compiler warnings about missing field initialisers I always provide explicit 0 values for unused fields (protected by #if PY_HEX_VERSION >= ...). However with v3.8b2 this triggers new warnings from Py_DEPRECATED because of the initialiser for tp_print.

I would like some way of locally suppressing Py_DEPRECATED. The attached trivial patch would do this by allowing me to define a null Py_DEPRECATED before including Python.h.

----------
components: Interpreter Core
files: pyport.h.diff
keywords: patch
messages: 347848
nosy: philthompson10
priority: normal
severity: normal
status: open
title: Py_DEPRECATED and unavoidable warnings
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48478/pyport.h.diff

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37588>
_______________________________________


More information about the New-bugs-announce mailing list