Closed as not planned
Closed as not planned
Description
Bug report
Bug description:
test_functools fail during build of python3.13.3 with --enable-optimization and --without-docs-string
Hello, everyone.
I do not know if this is a normal behavior or a bug but,
I tried to compile python 3.13.3 with option : --without-doc-strings and --enable-optimizations
But it always fail during test_functools :
======================================================================
FAIL: test_doc (test.test_functools.TestCachedProperty.test_doc)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 3318, in test_doc
self.assertEqual(CachedCostItem.cost.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
("The cost of the item."
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'The cost of the item.' != None
======================================================================
FAIL: test_double_wrapped_methods (test.test_functools.TestSingleDispatch.test_double_wrapped_methods) (meth=<function TestSingleDispatch.test_double_wrapped_methods.<locals>.WithSingleDispatch.cls_context_manager at 0x7f39614684a0>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2863, in test_double_wrapped_methods
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_double_wrapped_methods (test.test_functools.TestSingleDispatch.test_double_wrapped_methods) (meth=<function TestSingleDispatch.test_double_wrapped_methods.<locals>.WithSingleDispatch.cls_context_manager at 0x7f3961469300>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2863, in test_double_wrapped_methods
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_double_wrapped_methods (test.test_functools.TestSingleDispatch.test_double_wrapped_methods) (meth=<function TestSingleDispatch.test_double_wrapped_methods.<locals>.WithSingleDispatch.decorated_classmethod at 0x7f39614694e0>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2863, in test_double_wrapped_methods
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_double_wrapped_methods (test.test_functools.TestSingleDispatch.test_double_wrapped_methods) (meth=<function TestSingleDispatch.test_double_wrapped_methods.<locals>.WithSingleDispatch.decorated_classmethod at 0x7f3961469580>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2863, in test_double_wrapped_methods
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_method_wrapping_attributes (test.test_functools.TestSingleDispatch.test_method_wrapping_attributes) (meth=<function TestSingleDispatch.test_method_wrapping_attributes.<locals>.A.func at 0x7f396146b2e0>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2771, in test_method_wrapping_attributes
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_method_wrapping_attributes (test.test_functools.TestSingleDispatch.test_method_wrapping_attributes) (meth=<function TestSingleDispatch.test_method_wrapping_attributes.<locals>.A.func at 0x7f396338bce0>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2771, in test_method_wrapping_attributes
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_method_wrapping_attributes (test.test_functools.TestSingleDispatch.test_method_wrapping_attributes) (meth=<function TestSingleDispatch.test_method_wrapping_attributes.<locals>.A.cls_func at 0x7f396338ba60>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2771, in test_method_wrapping_attributes
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_method_wrapping_attributes (test.test_functools.TestSingleDispatch.test_method_wrapping_attributes) (meth=<function TestSingleDispatch.test_method_wrapping_attributes.<locals>.A.cls_func at 0x7f396338bc40>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2771, in test_method_wrapping_attributes
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_method_wrapping_attributes (test.test_functools.TestSingleDispatch.test_method_wrapping_attributes) (meth=<function TestSingleDispatch.test_method_wrapping_attributes.<locals>.A.static_func at 0x7f396338bba0>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2771, in test_method_wrapping_attributes
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
======================================================================
FAIL: test_method_wrapping_attributes (test.test_functools.TestSingleDispatch.test_method_wrapping_attributes) (meth=<function TestSingleDispatch.test_method_wrapping_attributes.<locals>.A.static_func at 0x7f396338bd80>)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Python-3.13.3/Lib/test/test_functools.py", line 2771, in test_method_wrapping_attributes
self.assertEqual(meth.__doc__,
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
('My function docstring'
^^^^^^^^^^^^^^^^^^^^^^^^
if support.HAVE_DOCSTRINGS
^^^^^^^^^^^^^^^^^^^^^^^^^^
else None))
^^^^^^^^^^^
AssertionError: 'My function docstring' != None
----------------------------------------------------------------------
Ran 284 tests in 1.776s
FAILED (failures=11, skipped=4)
test test_functools failed
0:00:02 load avg: 1.21 [1/1/1] test_functools failed (11 failures)
== Tests result: FAILURE ==
1 test failed:
test_functools
Total duration: 2.1 sec
Total tests: run=284 failures=11 skipped=4
Total test files: run=1/1 failed=1
Result: FAILURE
The same build environnement with python3.11 work fine.
If I remove one of --without-doc-string or --enable-optimizations the build work fine.
build setup :
- debian9
- glibc2.24
./configure --enable-optimizations --without-doc-strings --with-lto=full --disable-test-modules \
--with-computed-gotos --enable-shared \
--enable-loadable-sqlite-extensions --with-ssl-default-suites=openssl --with-openssl=/openssl-3.2.0/ \
--with-openssl-rpath=auto
make PROFILE_TASK="-m test.regrtest --pgo -j$CORE_NB" -j$CORE_NB;
CPython versions tested on:
3.13
Operating systems tested on:
Linux