diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-07-08 10:48:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 10:48:01 (GMT) |
commit | a3739b207adb5d17e3b53347df05b54b1a8b87f0 (patch) | |
tree | 682f352648cabd6de5440fafa8fd4e9f6246f76b /Lib | |
parent | 15f0fc571c1fbc84b6b74dfeb373ca3d35e4c5d7 (diff) | |
download | cpython-a3739b207adb5d17e3b53347df05b54b1a8b87f0.zip cpython-a3739b207adb5d17e3b53347df05b54b1a8b87f0.tar.gz cpython-a3739b207adb5d17e3b53347df05b54b1a8b87f0.tar.bz2 |
bpo-43908: Immutable types inherit vectorcall (GH-27001)
Heap types with the Py_TPFLAGS_IMMUTABLETYPE flag can now inherit the
PEP 590 vectorcall protocol. Previously, this was only possible for static types.
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_call.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py index 3f45922..c929ca8 100644 --- a/Lib/test/test_call.py +++ b/Lib/test/test_call.py @@ -563,7 +563,7 @@ class TestPEP590(unittest.TestCase): self.assertTrue(_testcapi.MethodDescriptorDerived.__flags__ & Py_TPFLAGS_METHOD_DESCRIPTOR) self.assertFalse(_testcapi.MethodDescriptorNopGet.__flags__ & Py_TPFLAGS_METHOD_DESCRIPTOR) - # Heap type should not inherit Py_TPFLAGS_METHOD_DESCRIPTOR + # Mutable heap types should not inherit Py_TPFLAGS_METHOD_DESCRIPTOR class MethodDescriptorHeap(_testcapi.MethodDescriptorBase): pass self.assertFalse(MethodDescriptorHeap.__flags__ & Py_TPFLAGS_METHOD_DESCRIPTOR) @@ -574,7 +574,7 @@ class TestPEP590(unittest.TestCase): self.assertFalse(_testcapi.MethodDescriptorNopGet.__flags__ & Py_TPFLAGS_HAVE_VECTORCALL) self.assertTrue(_testcapi.MethodDescriptor2.__flags__ & Py_TPFLAGS_HAVE_VECTORCALL) - # Heap type should not inherit Py_TPFLAGS_HAVE_VECTORCALL + # Mutable heap types should not inherit Py_TPFLAGS_HAVE_VECTORCALL class MethodDescriptorHeap(_testcapi.MethodDescriptorBase): pass self.assertFalse(MethodDescriptorHeap.__flags__ & Py_TPFLAGS_HAVE_VECTORCALL) |