Skip to content

ImportError in test.support.suppress_imortalization when using --enable-optimizations and --disable-test-modules #135734

Open
@ChrisLovering

Description

@ChrisLovering

Bug report

Bug description:

Building with ./configure --disable-test-modules --enable-optimizations --disable-gil causes tests to fail.

This works just fine on 3.13.2.
However, on 3.13.3, 3.13.4, 3.13.5, and the current 3.13 branch the tests fail.

Test output Full build output can be provided if useful.
18.71 Checked 112 modules (33 built-in, 63 shared, 1 n/a on linux-x86_64, 15 disabled, 0 missing, 0 failed on import)
18.76 make[2]: Leaving directory '/opt/cpython'
18.76 touch profile-gen-stamp
18.76 make[1]: Leaving directory '/opt/cpython'
18.76 # Next, run the profile task to generate the profile information.
18.76 ./python -m test --pgo --timeout=
19.04 Using random seed: 387045859
19.04 0:00:00 load avg: 4.75 Run 43 tests sequentially in a single process
19.04 0:00:00 load avg: 4.75 [ 1/43] test_array
20.20 0:00:01 load avg: 4.75 [ 1/43] test_array passed
20.20 0:00:01 load avg: 4.75 [ 2/43] test_base64
20.58 0:00:01 load avg: 4.45 [ 2/43] test_base64 passed
20.58 0:00:01 load avg: 4.45 [ 3/43] test_binascii
20.66 0:00:01 load avg: 4.45 [ 3/43] test_binascii passed
20.66 0:00:01 load avg: 4.45 [ 4/43] test_binop
20.71 0:00:01 load avg: 4.45 [ 4/43] test_binop passed
20.71 0:00:01 load avg: 4.45 [ 5/43] test_bisect
20.80 0:00:01 load avg: 4.45 [ 5/43] test_bisect passed
20.80 0:00:01 load avg: 4.45 [ 6/43] test_bytes
20.90 0:00:01 load avg: 4.45 [ 6/43] test_bytes skipped
20.90 0:00:01 load avg: 4.45 [ 7/43] test_bz2
21.93 0:00:02 load avg: 4.45 [ 7/43] test_bz2 passed
21.93 0:00:02 load avg: 4.45 [ 8/43] test_cmath
22.07 0:00:03 load avg: 4.45 [ 8/43] test_cmath passed
22.07 0:00:03 load avg: 4.45 [ 9/43] test_codecs
23.44 0:00:04 load avg: 4.45 [ 9/43] test_codecs passed
23.44 0:00:04 load avg: 4.45 [10/43] test_collections
24.29 0:00:05 load avg: 4.45 [10/43] test_collections passed
24.29 0:00:05 load avg: 4.45 [11/43] test_complex
24.54 0:00:05 load avg: 4.45 [11/43] test_complex passed
24.54 0:00:05 load avg: 4.45 [12/43] test_dataclasses
25.03 0:00:05 load avg: 4.45 [12/43] test_dataclasses passed
25.03 0:00:05 load avg: 4.45 [13/43] test_datetime
30.08 0:00:11 load avg: 4.18 [13/43] test_datetime passed
30.08 0:00:11 load avg: 4.18 [14/43] test_decimal
34.06 0:00:15 load avg: 3.92 [14/43] test_decimal passed
34.06 0:00:15 load avg: 3.92 [15/43] test_difflib
35.27 0:00:16 load avg: 3.92 [15/43] test_difflib passed
35.27 0:00:16 load avg: 3.92 [16/43] test_float
35.64 0:00:16 load avg: 3.69 [16/43] test_float passed
35.64 0:00:16 load avg: 3.69 [17/43] test_fstring
36.77 0:00:17 load avg: 3.69 [17/43] test_fstring passed
36.77 0:00:17 load avg: 3.69 [18/43] test_functools
37.68 test test_functools failed
37.68 0:00:18 load avg: 3.69 [18/43] test_functools failed (2 failures)
37.68 0:00:18 load avg: 3.69 [19/43] test_generators
38.33 0:00:19 load avg: 3.69 [19/43] test_generators passed
38.33 0:00:19 load avg: 3.69 [20/43] test_hashlib
38.94 0:00:19 load avg: 3.69 [20/43] test_hashlib passed
38.94 0:00:19 load avg: 3.69 [21/43] test_heapq
39.89 0:00:20 load avg: 3.69 [21/43] test_heapq passed
39.89 0:00:20 load avg: 3.69 [22/43] test_int
40.44 0:00:21 load avg: 3.47 [22/43] test_int passed
40.44 0:00:21 load avg: 3.47 [23/43] test_itertools
45.79 0:00:26 load avg: 3.27 [23/43] test_itertools passed
45.79 0:00:26 load avg: 3.27 [24/43] test_json
48.33 0:00:29 load avg: 3.27 [24/43] test_json passed
48.33 0:00:29 load avg: 3.27 [25/43] test_long
51.07 0:00:32 load avg: 3.09 [25/43] test_long passed
51.07 0:00:32 load avg: 3.09 [26/43] test_lzma
51.48 0:00:32 load avg: 3.09 [26/43] test_lzma passed
51.48 0:00:32 load avg: 3.09 [27/43] test_math
54.75 0:00:35 load avg: 3.09 [27/43] test_math passed
54.75 0:00:35 load avg: 3.09 [28/43] test_memoryview
56.24 0:00:37 load avg: 2.92 [28/43] test_memoryview passed
56.24 0:00:37 load avg: 2.92 [29/43] test_operator
56.54 0:00:37 load avg: 2.92 [29/43] test_operator passed
56.54 0:00:37 load avg: 2.92 [30/43] test_ordered_dict
59.61 test test_ordered_dict failed
59.61 0:00:40 load avg: 2.92 [30/43] test_ordered_dict failed (4 failures)
59.61 0:00:40 load avg: 2.92 [31/43] test_patma
59.99 0:00:40 load avg: 2.92 [31/43] test_patma passed
59.99 0:00:40 load avg: 2.92 [32/43] test_pickle
66.69 0:00:47 load avg: 2.63 [32/43] test_pickle passed
66.69 0:00:47 load avg: 2.63 [33/43] test_pprint
67.15 0:00:48 load avg: 2.63 [33/43] test_pprint passed
67.15 0:00:48 load avg: 2.63 [34/43] test_re
68.60 0:00:49 load avg: 2.63 [34/43] test_re passed
68.60 0:00:49 load avg: 2.63 [35/43] test_set
78.07 0:00:59 load avg: 2.38 [35/43] test_set passed
78.07 0:00:59 load avg: 2.38 [36/43] test_sqlite3
82.41 0:01:03 load avg: 2.27 [36/43] test_sqlite3 passed
82.41 0:01:03 load avg: 2.27 [37/43] test_statistics
86.71 0:01:07 load avg: 2.17 [37/43] test_statistics passed
86.71 0:01:07 load avg: 2.17 [38/43] test_str
91.18 0:01:12 load avg: 2.07 [38/43] test_str passed
91.18 0:01:12 load avg: 2.07 [39/43] test_struct
93.43 test test_struct failed
93.43 0:01:14 load avg: 2.07 [39/43] test_struct failed (1 failure)
93.43 0:01:14 load avg: 2.07 [40/43] test_tabnanny
95.35 0:01:16 load avg: 2.07 [40/43] test_tabnanny passed
95.35 0:01:16 load avg: 2.07 [41/43] test_time
99.76 0:01:20 load avg: 1.99 [41/43] test_time passed
99.76 0:01:20 load avg: 1.99 [42/43] test_xml_etree
107.3 0:01:28 load avg: 1.83 [42/43] test_xml_etree passed
107.3 0:01:28 load avg: 1.83 [43/43] test_xml_etree_c
117.3 0:01:38 load avg: 1.71 [43/43] test_xml_etree_c passed
117.3
117.3 Total duration: 1 min 38 sec
117.3 Total tests: run=9,073 failures=7 skipped=312
117.3 Total test files: run=43/43 failed=3 skipped=1
117.3 Result: FAILURE
118.1 make: *** [Makefile:904: profile-run-stamp] Error 2
------
python_builder.dockerfile:6
--------------------
   4 |     WORKDIR /opt/cpython
   5 |     RUN ./configure --disable-test-modules --enable-optimizations --disable-gil
   6 | >>> RUN make -j$(nproc)
   7 |
--------------------
ERROR: failed to solve: process "/bin/sh -c make -j$(nproc)" did not complete successfully: exit code: 2
Dockerfile used
FROM buildpack-deps:bookworm
RUN apt-get -y update && apt-get install -y --no-install-recommends tk-dev
RUN git clone -b v3.13.5 --depth 1 https://github.com/python/cpython.git /opt/cpython
WORKDIR /opt/cpython
RUN ./configure --disable-test-modules --enable-optimizations --disable-gil
RUN make -j$(nproc)

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixestestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions