You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
object.h contains an inline function that causes a -Wcast-qual warning from gcc. Since this file ends up visible in third-party code that includes Python.h, this makes it impossible to use -Wcast-qual in such code.
The problem is the change c5cb077, which replaced ob->ob_type by Py_TYPE(ob), which seems reasonable by itself, but Py_TYPE casts away the const, so it creates this problem.
Activity
petere commentedon Mar 5, 2021
object.h contains an inline function that causes a -Wcast-qual warning from gcc. Since this file ends up visible in third-party code that includes Python.h, this makes it impossible to use -Wcast-qual in such code.
The problem is the change c5cb077, which replaced ob->ob_type by Py_TYPE(ob), which seems reasonable by itself, but Py_TYPE casts away the const, so it creates this problem.
This is a regression in Python 3.10.
terryjreedy commentedon Mar 12, 2021
Victor, the apparent 3.10 regression is from your commit.
vstinner commentedon Mar 13, 2021
Which function? Can you please provide the warning?
Do you want to propose a fix?
leifwalsh commentedon Jun 30, 2021
Duplicated by https://bugs.python.org/issue44378, which has a fix merged.
vstinner commentedon Jul 1, 2021
Right. I close the issue as a duplicate.