]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-90230: Fix warnings and failures with --enable-pystats (GH-96622)
authorBrandt Bucher <brandtbucher@microsoft.com>
Fri, 9 Sep 2022 21:42:29 +0000 (14:42 -0700)
committerGitHub <noreply@github.com>
Fri, 9 Sep 2022 21:42:29 +0000 (14:42 -0700)
Misc/NEWS.d/next/Core and Builtins/2022-09-06-11-19-03.gh-issue-90230.YOtzs5.rst [new file with mode: 0644]
Python/specialize.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-09-06-11-19-03.gh-issue-90230.YOtzs5.rst b/Misc/NEWS.d/next/Core and Builtins/2022-09-06-11-19-03.gh-issue-90230.YOtzs5.rst
new file mode 100644 (file)
index 0000000..aac48e7
--- /dev/null
@@ -0,0 +1,2 @@
+Fix compiler warnings and test failures when building with
+``--enable-pystats``.
index 299adf34528a587e28b86b6b2b4807e67330a259..93f1d289b3acb7c5c562dc8077cf8a23e94fd6a3 100644 (file)
@@ -121,6 +121,7 @@ _Py_GetSpecializationStats(void) {
     err += add_stat_dict(stats, BINARY_OP, "binary_op");
     err += add_stat_dict(stats, COMPARE_OP, "compare_op");
     err += add_stat_dict(stats, UNPACK_SEQUENCE, "unpack_sequence");
+    err += add_stat_dict(stats, FOR_ITER, "for_iter");
     if (err < 0) {
         Py_DECREF(stats);
         return NULL;
@@ -975,6 +976,7 @@ load_attr_fail_kind(DescriptorClassification kind)
         case MUTABLE:
             return SPEC_FAIL_ATTR_MUTABLE_CLASS;
         case GETSET_OVERRIDDEN:
+        case GETATTRIBUTE_IS_PYTHON_FUNCTION:
             return SPEC_FAIL_OVERRIDDEN;
         case BUILTIN_CLASSMETHOD:
             return SPEC_FAIL_ATTR_BUILTIN_CLASS_METHOD;