Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

lib-python/3/test/test_weakref.py::unmodified

== PyPy 3.12.13 (8ba7ab03fab8, Jul 08 2026, 04:20:17) [PyPy 7.3.24-alpha0 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]
== Linux-6.1.0-22-amd64-x86_64-with-glibc2.17 little-endian
== Python build: release with_assert
== cwd: /tmp/pytest/test_python_worker_274328æ
== CPU count: 4
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network

Using random seed: 2256595521
0:00:00 load avg: 0.63 Run 1 test sequentially in a single process
0:00:00 load avg: 0.63 [1/1] test_weakref
test_all_freed (test.test_weakref.FinalizeTestCase.test_all_freed) ... ok
test_arg_errors (test.test_weakref.FinalizeTestCase.test_arg_errors) ... ok
test_atexit (test.test_weakref.FinalizeTestCase.test_atexit) ... ok
test_finalize (test.test_weakref.FinalizeTestCase.test_finalize) ... ok
test_order (test.test_weakref.FinalizeTestCase.test_order) ... ok
test_make_weak_keyed_dict_from_dict (test.test_weakref.MappingTestCase.test_make_weak_keyed_dict_from_dict) ... ok
test_make_weak_keyed_dict_from_weak_keyed_dict (test.test_weakref.MappingTestCase.test_make_weak_keyed_dict_from_weak_keyed_dict) ... ok
test_make_weak_keyed_dict_repr (test.test_weakref.MappingTestCase.test_make_weak_keyed_dict_repr) ... ok
test_make_weak_valued_dict_from_dict (test.test_weakref.MappingTestCase.test_make_weak_valued_dict_from_dict) ... ok
test_make_weak_valued_dict_from_weak_valued_dict (test.test_weakref.MappingTestCase.test_make_weak_valued_dict_from_weak_valued_dict) ... ok
test_make_weak_valued_dict_misc (test.test_weakref.MappingTestCase.test_make_weak_valued_dict_misc) ... ok
test_make_weak_valued_dict_repr (test.test_weakref.MappingTestCase.test_make_weak_valued_dict_repr) ... ok
test_remove_closure (test.test_weakref.MappingTestCase.test_remove_closure) ... skipped 'implementation detail specific to cpython'
test_threaded_weak_key_dict_copy (test.test_weakref.MappingTestCase.test_threaded_weak_key_dict_copy) ... ok
test_threaded_weak_key_dict_deepcopy (test.test_weakref.MappingTestCase.test_threaded_weak_key_dict_deepcopy) ... skipped "resource 'cpu' is not enabled"
test_threaded_weak_value_dict_copy (test.test_weakref.MappingTestCase.test_threaded_weak_value_dict_copy) ... ok
test_threaded_weak_value_dict_deepcopy (test.test_weakref.MappingTestCase.test_threaded_weak_value_dict_deepcopy) ... skipped "resource 'cpu' is not enabled"
test_threaded_weak_valued_consistency (test.test_weakref.MappingTestCase.test_threaded_weak_valued_consistency) ... ok
test_threaded_weak_valued_pop (test.test_weakref.MappingTestCase.test_threaded_weak_valued_pop) ... ok
test_threaded_weak_valued_setdefault (test.test_weakref.MappingTestCase.test_threaded_weak_valued_setdefault) ... ok
test_weak_keyed_bad_delitem (test.test_weakref.MappingTestCase.test_weak_keyed_bad_delitem) ... ok
test_weak_keyed_cascading_deletes (test.test_weakref.MappingTestCase.test_weak_keyed_cascading_deletes) ... ok
test_weak_keyed_delitem (test.test_weakref.MappingTestCase.test_weak_keyed_delitem) ... ok
test_weak_keyed_dict_popitem (test.test_weakref.MappingTestCase.test_weak_keyed_dict_popitem) ... ok
test_weak_keyed_dict_setdefault (test.test_weakref.MappingTestCase.test_weak_keyed_dict_setdefault) ... ok
test_weak_keyed_dict_update (test.test_weakref.MappingTestCase.test_weak_keyed_dict_update) ... ok
test_weak_keyed_iters (test.test_weakref.MappingTestCase.test_weak_keyed_iters) ... ok
test_weak_keyed_len_cycles (test.test_weakref.MappingTestCase.test_weak_keyed_len_cycles) ... ok
test_weak_keyed_len_race (test.test_weakref.MappingTestCase.test_weak_keyed_len_race) ... ERROR
test_weak_keyed_union_operators (test.test_weakref.MappingTestCase.test_weak_keyed_union_operators) ... FAIL
test_weak_keys (test.test_weakref.MappingTestCase.test_weak_keys) ... ok
test_weak_keys_destroy_while_iterating (test.test_weakref.MappingTestCase.test_weak_keys_destroy_while_iterating) ... ok
test_weak_valued_delitem (test.test_weakref.MappingTestCase.test_weak_valued_delitem) ... ok
test_weak_valued_dict_popitem (test.test_weakref.MappingTestCase.test_weak_valued_dict_popitem) ... ok
test_weak_valued_dict_setdefault (test.test_weakref.MappingTestCase.test_weak_valued_dict_setdefault) ... ok
test_weak_valued_dict_update (test.test_weakref.MappingTestCase.test_weak_valued_dict_update) ... ok
test_weak_valued_iters (test.test_weakref.MappingTestCase.test_weak_valued_iters) ... ok
test_weak_valued_len_cycles (test.test_weakref.MappingTestCase.test_weak_valued_len_cycles) ... ok
test_weak_valued_len_race (test.test_weakref.MappingTestCase.test_weak_valued_len_race) ... ERROR
test_weak_valued_union_operators (test.test_weakref.MappingTestCase.test_weak_valued_union_operators) ... FAIL
test_weak_values (test.test_weakref.MappingTestCase.test_weak_values) ... ok
test_weak_values_destroy_while_iterating (test.test_weakref.MappingTestCase.test_weak_values_destroy_while_iterating) ... ok
test_names (test.test_weakref.ModuleTestCase.test_names) ... ok
test_basic_callback (test.test_weakref.ReferencesTestCase.test_basic_callback) ... ok
test_basic_proxy (test.test_weakref.ReferencesTestCase.test_basic_proxy) ... ok
test_basic_ref (test.test_weakref.ReferencesTestCase.test_basic_ref) ... ok
test_callable_proxy (test.test_weakref.ReferencesTestCase.test_callable_proxy) ... ok
test_callback_attribute (test.test_weakref.ReferencesTestCase.test_callback_attribute) ... ok
test_callback_attribute_after_deletion (test.test_weakref.ReferencesTestCase.test_callback_attribute_after_deletion) ... ok
test_callback_different_classes (test.test_weakref.ReferencesTestCase.test_callback_different_classes) ... ok
test_callback_gcs (test.test_weakref.ReferencesTestCase.test_callback_gcs) ... ok
test_callback_in_cycle (test.test_weakref.ReferencesTestCase.test_callback_in_cycle) ... ok
test_callback_in_cycle_resurrection (test.test_weakref.ReferencesTestCase.test_callback_in_cycle_resurrection) ... ok
test_callback_reachable_one_way (test.test_weakref.ReferencesTestCase.test_callback_reachable_one_way) ... ok
test_callbacks_on_callback (test.test_weakref.ReferencesTestCase.test_callbacks_on_callback) ... ok
test_callbacks_protected (test.test_weakref.ReferencesTestCase.test_callbacks_protected) ... ok
test_cfunction (test.test_weakref.ReferencesTestCase.test_cfunction) ... skipped 'implementation detail specific to cpython'
test_classes (test.test_weakref.ReferencesTestCase.test_classes) ... ok
test_constructor_kwargs (test.test_weakref.ReferencesTestCase.test_constructor_kwargs) ... ok
test_equality (test.test_weakref.ReferencesTestCase.test_equality) ... ok
test_gc_during_proxy_creation (test.test_weakref.ReferencesTestCase.test_gc_during_proxy_creation) ... ERROR
test_gc_during_ref_creation (test.test_weakref.ReferencesTestCase.test_gc_during_ref_creation) ... ERROR
test_getweakrefcount (test.test_weakref.ReferencesTestCase.test_getweakrefcount) ... ok
test_getweakrefs (test.test_weakref.ReferencesTestCase.test_getweakrefs) ... ok
test_hashing (test.test_weakref.ReferencesTestCase.test_hashing) ... ok
test_init (test.test_weakref.ReferencesTestCase.test_init) ... ok
test_multiple_callbacks (test.test_weakref.ReferencesTestCase.test_multiple_callbacks) ... ok
test_multiple_selfref_callbacks (test.test_weakref.ReferencesTestCase.test_multiple_selfref_callbacks) ... ok
test_newstyle_number_ops (test.test_weakref.ReferencesTestCase.test_newstyle_number_ops) ... ok
test_ordering (test.test_weakref.ReferencesTestCase.test_ordering) ... ok
test_proxy_bad_next (test.test_weakref.ReferencesTestCase.test_proxy_bad_next) ... ok
test_proxy_bool (test.test_weakref.ReferencesTestCase.test_proxy_bool) ... ok
test_proxy_deletion (test.test_weakref.ReferencesTestCase.test_proxy_deletion) ... ok
test_proxy_div (test.test_weakref.ReferencesTestCase.test_proxy_div) ... ok
test_proxy_hash (test.test_weakref.ReferencesTestCase.test_proxy_hash) ... ok
test_proxy_index (test.test_weakref.ReferencesTestCase.test_proxy_index) ... ok
test_proxy_iter (test.test_weakref.ReferencesTestCase.test_proxy_iter) ... ok
test_proxy_matmul (test.test_weakref.ReferencesTestCase.test_proxy_matmul) ... ok
test_proxy_next (test.test_weakref.ReferencesTestCase.test_proxy_next) ... ok
test_proxy_ref (test.test_weakref.ReferencesTestCase.test_proxy_ref) ... ok
test_proxy_reuse (test.test_weakref.ReferencesTestCase.test_proxy_reuse) ... ok
test_proxy_reversed (test.test_weakref.ReferencesTestCase.test_proxy_reversed) ... ok
test_proxy_unicode (test.test_weakref.ReferencesTestCase.test_proxy_unicode) ... ok
test_ref_created_during_del (test.test_weakref.ReferencesTestCase.test_ref_created_during_del) ... ok
test_ref_reuse (test.test_weakref.ReferencesTestCase.test_ref_reuse) ... ok
test_repr_failure_gh99184 (test.test_weakref.ReferencesTestCase.test_repr_failure_gh99184) ... ok
test_set_callback_attribute (test.test_weakref.ReferencesTestCase.test_set_callback_attribute) ... ok
test_sf_bug_840829 (test.test_weakref.ReferencesTestCase.test_sf_bug_840829) ... ok
test_shared_proxy_without_callback (test.test_weakref.ReferencesTestCase.test_shared_proxy_without_callback) ... ok
test_shared_ref_without_callback (test.test_weakref.ReferencesTestCase.test_shared_ref_without_callback) ... ok
test_trashcan_16602 (test.test_weakref.ReferencesTestCase.test_trashcan_16602) ... ok
test_subclass_refs (test.test_weakref.SubclassableWeakrefTestCase.test_subclass_refs) ... ok
test_subclass_refs_dont_conflate_callbacks (test.test_weakref.SubclassableWeakrefTestCase.test_subclass_refs_dont_conflate_callbacks) ... ok
test_subclass_refs_dont_replace_standard_refs (test.test_weakref.SubclassableWeakrefTestCase.test_subclass_refs_dont_replace_standard_refs) ... ok
test_subclass_refs_with_cycle (test.test_weakref.SubclassableWeakrefTestCase.test_subclass_refs_with_cycle)
Confirm https://bugs.python.org/issue3100 is fixed. ... ok
test_subclass_refs_with_slots (test.test_weakref.SubclassableWeakrefTestCase.test_subclass_refs_with_slots) ... ok
test_bool (test.test_weakref.WeakKeyDictionaryTestCase.test_bool) ... ok
test_constructor (test.test_weakref.WeakKeyDictionaryTestCase.test_constructor) ... ok
test_get (test.test_weakref.WeakKeyDictionaryTestCase.test_get) ... ok
test_getitem (test.test_weakref.WeakKeyDictionaryTestCase.test_getitem) ... ok
test_items (test.test_weakref.WeakKeyDictionaryTestCase.test_items) ... ok
test_keys (test.test_weakref.WeakKeyDictionaryTestCase.test_keys) ... ok
test_len (test.test_weakref.WeakKeyDictionaryTestCase.test_len) ... ok
test_pop (test.test_weakref.WeakKeyDictionaryTestCase.test_pop) ... ok
test_popitem (test.test_weakref.WeakKeyDictionaryTestCase.test_popitem) ... ok
test_read (test.test_weakref.WeakKeyDictionaryTestCase.test_read) ... ok
test_setdefault (test.test_weakref.WeakKeyDictionaryTestCase.test_setdefault) ... ok
test_update (test.test_weakref.WeakKeyDictionaryTestCase.test_update) ... ok
test_values (test.test_weakref.WeakKeyDictionaryTestCase.test_values) ... ok
test_write (test.test_weakref.WeakKeyDictionaryTestCase.test_write) ... ok
test_alive (test.test_weakref.WeakMethodTestCase.test_alive) ... ok
test_callback_when_method_dead (test.test_weakref.WeakMethodTestCase.test_callback_when_method_dead) ... ok
test_callback_when_object_dead (test.test_weakref.WeakMethodTestCase.test_callback_when_object_dead) ... ok
test_equality (test.test_weakref.WeakMethodTestCase.test_equality) ... ok
test_hashing (test.test_weakref.WeakMethodTestCase.test_hashing) ... ok
test_method_dead (test.test_weakref.WeakMethodTestCase.test_method_dead) ... ok
test_no_cycles (test.test_weakref.WeakMethodTestCase.test_no_cycles) ... skipped 'implementation detail specific to cpython'
test_object_dead (test.test_weakref.WeakMethodTestCase.test_object_dead) ... ok
test_bool (test.test_weakref.WeakValueDictionaryTestCase.test_bool) ... ok
test_constructor (test.test_weakref.WeakValueDictionaryTestCase.test_constructor) ... ok
test_get (test.test_weakref.WeakValueDictionaryTestCase.test_get) ... ok
test_getitem (test.test_weakref.WeakValueDictionaryTestCase.test_getitem) ... ok
test_items (test.test_weakref.WeakValueDictionaryTestCase.test_items) ... ok
test_keys (test.test_weakref.WeakValueDictionaryTestCase.test_keys) ... ok
test_len (test.test_weakref.WeakValueDictionaryTestCase.test_len) ... ok
test_pop (test.test_weakref.WeakValueDictionaryTestCase.test_pop) ... ok
test_popitem (test.test_weakref.WeakValueDictionaryTestCase.test_popitem) ... ok
test_read (test.test_weakref.WeakValueDictionaryTestCase.test_read) ... ok
test_setdefault (test.test_weakref.WeakValueDictionaryTestCase.test_setdefault) ... ok
test_update (test.test_weakref.WeakValueDictionaryTestCase.test_update) ... ok
test_values (test.test_weakref.WeakValueDictionaryTestCase.test_values) ... ok
test_write (test.test_weakref.WeakValueDictionaryTestCase.test_write) ... ok
libreftest (test.test_weakref.__test__)
Doctest: test.test_weakref.__test__.libreftest ... ok

======================================================================
ERROR: test_weak_keyed_len_race (test.test_weakref.MappingTestCase.test_weak_keyed_len_race)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 1267, in test_weak_keyed_len_race
    self.check_len_race(weakref.WeakKeyDictionary, lambda k: (k, 1))
         ^^^^^^^^^^^^^^
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 1244, in check_len_race
    self.addCleanup(gc.set_threshold, *gc.get_threshold())
                       ^^^^^^^^^^^^^
AttributeError: module 'gc' has no attribute 'set_threshold'

======================================================================
ERROR: test_weak_valued_len_race (test.test_weakref.MappingTestCase.test_weak_valued_len_race)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 1270, in test_weak_valued_len_race
    self.check_len_race(weakref.WeakValueDictionary, lambda k: (1, k))
         ^^^^^^^^^^^^^^
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 1244, in check_len_race
    self.addCleanup(gc.set_threshold, *gc.get_threshold())
                       ^^^^^^^^^^^^^
AttributeError: module 'gc' has no attribute 'set_threshold'

======================================================================
ERROR: test_gc_during_proxy_creation (test.test_weakref.ReferencesTestCase.test_gc_during_proxy_creation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 791, in test_gc_during_proxy_creation
    self.check_gc_during_creation(weakref.proxy)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 794, in check_gc_during_creation
    thresholds = gc.get_threshold()
                    ^^^^^^^^^^^^^
AttributeError: module 'gc' has no attribute 'get_threshold'

======================================================================
ERROR: test_gc_during_ref_creation (test.test_weakref.ReferencesTestCase.test_gc_during_ref_creation)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 788, in test_gc_during_ref_creation
    self.check_gc_during_creation(weakref.ref)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 794, in check_gc_during_creation
    thresholds = gc.get_threshold()
                    ^^^^^^^^^^^^^
AttributeError: module 'gc' has no attribute 'get_threshold'

======================================================================
FAIL: test_weak_keyed_union_operators (test.test_weakref.MappingTestCase.test_weak_keyed_union_operators)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 1753, in test_weak_keyed_union_operators
    self.assertNotIn(4, tmp1.values())
         ^^^^^^^^^^^
AssertionError: 4 unexpectedly found in <generator object WeakKeyDictionary.values at 0x00007fb26503aba8>

======================================================================
FAIL: test_weak_valued_union_operators (test.test_weakref.MappingTestCase.test_weak_valued_union_operators)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build_dir/pypy-c-jit-linux-x86-64/build/lib-python/3/test/test_weakref.py", line 1701, in test_weak_valued_union_operators
    self.assertNotIn(2, tmp1)
         ^^^^^^^^^^^
AssertionError: 2 unexpectedly found in <WeakValueDictionary at 0x2ac8528>

----------------------------------------------------------------------
Ran 133 tests in 2.797s

FAILED (failures=2, errors=4, skipped=5)
0:00:02 load avg: 0.63 [1/1/1] test_weakref failed (4 errors, 2 failures)

== Tests result: FAILURE ==

1 test failed:
    test_weakref

Total duration: 2.9 sec
Total tests: run=133 failures=2 skipped=5
Total test files: run=1/1 failed=1
Result: FAILURE
test test_weakref failed
builder: pypy-c-jit-linux-x86-64 build #11852+
test: lib-python/3/test/test_weakref.py::unmodified