gh-111495: Add tests for PyNumber C API
- Issue: gh-111495
skip news, like other prs in the issue?
please move changes in abstract.c to a separate PR
That was the plan. But please could you first take look on these changes? This part seems to be finished and I would know, for example, if this can go in one PR or in several.
For now, almost every line for PyNumber_* C API is covered. Exceptions are like this: https://github.com/python/cpython/blob/d4f83e1e3a19e2f881115f20d58ae6a019ddb48f/Objects/abstract.c#L1593 ~~(result check here will require test code in C)~~
Also, there is an existing PyNumber test in test_abstract.
Indeed. Should I remove number_check() from the abstract.c or from the number.c instead?
Edit:
- now everything is covered
- number_check() removed from abstract.c
- I'll mark this pr as ready for review, as it's reviewed anyway (but it's apparently lacks a number of tests, esp. for mutable ops)
@skirpichev Are you still working on this PR? It is in the draft mode.
Are you still working on this PR? It is in the draft mode.
@serhiy-storchaka, sorry for a delay. I did update and I would appreciate any feedback.
Most binary ops are now tested with test_binary_ops()/test_inplace_binary_ops(). The rest covers special cases (sq_concat/sq_repeat slots, ternary pow()). I use built-in types to test this stuff but, perhaps, I should replace this with some C-coded test types.
It is too large peace of code
I was thinking about splitting out one or two prs. For example, test_check/long/float/index/tobase/asssizet, maybe with other unary functions. Let me know if this does make sense.
why test them with an object that only have the pos method?
That tests actual logic for PyNumber_Positive(), not just a special case for some builtin numeric type.
it should already be tested in other tests
Ok, got it. Maybe this does make sense. I'll run coverage tests on the whole test suite to check that.
Subtracting two numbers.
Maybe we should try random inputs (int/floats) and compare the result with related operation?
@serhiy-storchaka, sorry for a delay: now tests for unary/binary ops were reverted to basic tests, as you suggested. Let me know if I should revert something else: i.e. should we use support classes (like IndexLike) in other test functions or just keep basic test cases for builtin types.
In this version, however, this pr doesn't cover all lines in tested functions (even for unary arithmetic ops).
What's the status of this PR?
@vstinner, this is ready for review. However, I would prefer to not introduce yet another place with support classes (see https://github.com/python/cpython/issues/111673).
Thanks for the ndarray = None change ;-)
I merged your PR, thanks @skirpichev.
Maybe these tests are not exhaustive, but it's better than no tests!
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot AMD64 Ubuntu NoGIL 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1225/builds/2983) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1225/builds/2983
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1046, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
xpected failure
Traceback (most recent call last):
File "/home/ubuntu/buildarea/3.x.itamaro-ubuntu-aws.nogil/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot s390x Debian 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/49/builds/9840) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/49/builds/9840
Failed tests:
- test_interpreters
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/threading.py", line 1041, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/threading.py", line 992, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_interpreters/test_stress.py", line 29, in task
interp = interpreters.create()
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/support/interpreters/__init__.py", line 76, in create
id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot ARM64 MacOS M1 NoGIL 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1270/builds/2328) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1270/builds/2328
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.nogil/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1046, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
xpected failure
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot ARM Raspbian 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/424/builds/7977) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/424/builds/7977
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/var/lib/buildbot/workers/3.x.gps-raspbian.nondebug/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot s390x RHEL9 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1565/builds/176) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1565/builds/176
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot s390x SLES 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/540/builds/9790) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/540/builds/9790
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot s390x RHEL8 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/509/builds/7199) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/509/builds/7199
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot AMD64 RHEL8 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/185/builds/7497) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/185/builds/7497
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot wasm32-wasi 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1046/builds/5984) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1046/builds/5984
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot AMD64 FreeBSD14 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1232/builds/3141) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1232/builds/3141
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.opsec-fbsd14/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
Failed subtests: test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Oops, that's a real bug: I wrote PR gh-123338 to fix the tests.
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot wasm32-wasi Non-Debug 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1374/builds/1939) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1374/builds/1939
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot AMD64 RHEL8 LTO 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/64/builds/7496) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/64/builds/7496
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot x86-64 MacOS Intel ASAN NoGIL 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1366/builds/1951) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1366/builds/1951
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1046, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
xpected failure
Traceback (most recent call last):
File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.macos-with-brew.asan.nogil/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot s390x RHEL8 LTO + PGO 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/442/builds/7271) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/442/builds/7271
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel8-z.lto-pgo/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot iOS ARM64 Simulator 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1380/builds/1149) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1380/builds/1149
Summary of the results of the build (if available):
Click to see traceback logs
remote: Enumerating objects: 10, done.
remote: Counting objects: 10% (1/10)
remote: Counting objects: 20% (2/10)
remote: Counting objects: 30% (3/10)
remote: Counting objects: 40% (4/10)
remote: Counting objects: 50% (5/10)
remote: Counting objects: 60% (6/10)
remote: Counting objects: 70% (7/10)
remote: Counting objects: 80% (8/10)
remote: Counting objects: 90% (9/10)
remote: Counting objects: 100% (10/10)
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 11% (1/9)
remote: Compressing objects: 22% (2/9)
remote: Compressing objects: 33% (3/9)
remote: Compressing objects: 44% (4/9)
remote: Compressing objects: 55% (5/9)
remote: Compressing objects: 66% (6/9)
remote: Compressing objects: 77% (7/9)
remote: Compressing objects: 88% (8/9)
remote: Compressing objects: 100% (9/9)
remote: Compressing objects: 100% (9/9), done.
remote: Total 10 (delta 1), reused 2 (delta 1), pack-reused 0 (from 0)
From https://github.com/python/cpython
* branch main -> FETCH_HEAD
Note: switching to '2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 2f20f5a9bc gh-111495: Add tests for PyNumber C API (#111996)
Switched to and reset branch 'main'
configure: WARNING: -Wtrampolines not supported
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.
In file included from ../../Python/ceval.c:861:
../../Python/generated_cases.c.h:765:31: warning: code will never be executed [-Wunreachable-code]
for (int _i = oparg; --_i >= 0;) {
^~~~~
../../Python/generated_cases.c.h:657:31: warning: code will never be executed [-Wunreachable-code]
for (int _i = oparg*2; --_i >= 0;) {
^~~~~
2 warnings generated.
../../Modules/blake2module.c:314:18: warning: unused variable 'st' [-Wunused-variable]
Blake2State* st = blake2_get_state_from_type(type);
^
../../Modules/blake2module.c:107:20: warning: unused function 'has_simd128' [-Wunused-function]
static inline bool has_simd128(cpu_flags *flags) {
^
../../Modules/blake2module.c:113:20: warning: unused function 'has_simd256' [-Wunused-function]
static inline bool has_simd256(cpu_flags *flags) {
^
3 warnings generated.
configure: WARNING: -Wtrampolines not supported
configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)
configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly.
../../Modules/blake2module.c:314:18: warning: unused variable 'st' [-Wunused-variable]
Blake2State* st = blake2_get_state_from_type(type);
^
../../Modules/blake2module.c:107:20: warning: unused function 'has_simd128' [-Wunused-function]
static inline bool has_simd128(cpu_flags *flags) {
^
../../Modules/blake2module.c:113:20: warning: unused function 'has_simd256' [-Wunused-function]
static inline bool has_simd256(cpu_flags *flags) {
^
3 warnings generated.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:C6AEA11C-C34A-47B8-BD67-AF0403ECA353, OS:17.5, name:iPhone SE (3rd generation) }
{ platform:iOS Simulator, id:C6AEA11C-C34A-47B8-BD67-AF0403ECA353, OS:17.5, name:iPhone SE (3rd generation) }
2024-08-26 14:25:21.234 xcodebuild[17437:173676886] [MT] IDETestOperationsObserverDebug: 1151.576 elapsed -- Testing started completed.
2024-08-26 14:25:21.234 xcodebuild[17437:173676886] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2024-08-26 14:25:21.234 xcodebuild[17437:173676886] [MT] IDETestOperationsObserverDebug: 1151.576 sec, +1151.576 sec -- end
Failing tests:
-[iOSTestbedTests testPython]
** TEST FAILED **
make: *** [testios] Error 1
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot s390x RHEL9 LTO + PGO 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1578/builds/177) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1578/builds/177
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.lto-pgo/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot s390x Fedora 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/223/builds/6444) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/223/builds/6444
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot AMD64 Debian root 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/345/builds/8794) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/345/builds/8794
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"
:warning::warning::warning: Buildbot failure :warning::warning::warning:
Hi! The buildbot x86-64 MacOS Intel NoGIL 3.x has failed when building commit 2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1258/builds/2654) and take a look at the build logs.
- Check if the failure is related to this commit (2f20f5a9bc7dafdb3c2ae723da90eca1727a95f7) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1258/builds/2654
Failed tests:
- test_capi
Failed subtests:
- test_rshift_print - test.test_capi.test_number.CAPITest.test_rshift_print
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "<frozen importlib._bootstrap>", line 813, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1046, in create_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
ImportError: module _test_module_state_shared does not support loading in subinterpreters
xpected failure
Traceback (most recent call last):
File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-intel-aws.nogil/build/Lib/test/test_capi/test_number.py", line 227, in test_rshift_print
self.assertIn('Did you mean "print(<message>, '
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'file=<output_stream>)"?', str(context.exception))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Did you mean "print(<message>, file=<output_stream>)"?' not found in "unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'"