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

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

== PyPy 3.12.13 (a3c6b428e7a8, Jul 09 2026, 03:54:00) [PyPy 8.0.0-alpha0 with GCC Apple LLVM 16.0.0 (clang-1600.0.26.6)]
== macOS-15.7.7-arm64-arm-64bit little-endian
== Python build: release with_assert
== cwd: /private/tmp/buildbot-arm64/pytest/test_python_worker_56270æ
== CPU count: 8
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network

Using random seed: 1751837178
Raised RLIMIT_NOFILE: 256 -> 1024
0:00:00 load avg: 3.63 Run 1 test sequentially in a single process
0:00:00 load avg: 3.63 [1/1] test_marshal
0:00:00 load avg: 3.63 [1/1/1] test_marshal failed (uncaught exception)

== Tests result: FAILURE ==

1 test failed:
    test_marshal

Total duration: 65 ms
Total tests: run=0
Total test files: run=1/1 failed=1
Result: FAILURE
test test_marshal crashed -- Traceback (most recent call last):
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/libregrtest/single.py", line 181, in _runtest_env_changed_exc
    _load_run_test(result, runtests)
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/libregrtest/single.py", line 128, in _load_run_test
    test_mod = importlib.import_module(module_name)
                         ^^^^^^^^^^^^^
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
                      ^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<builtin>/frozen importlib._bootstrap_external", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_marshal.py", line 386, in <module>
    class LargeValuesTestCase(unittest.TestCase):
  File "/Users/matti/build-worker-arm64/pypy-c-jit-macos-arm64/build/lib-python/3/test/test_marshal.py", line 407, in LargeValuesTestCase
    memuse=pointer_size*12 + sys.getsizeof(LARGE_SIZE-1),
                                 ^^^^^^^^^
TypeError: getsizeof(...)
    getsizeof(object, default) -> int

    Return the size of object in bytes.

sys.getsizeof(object, default) will always return default on PyPy, and
raise a TypeError if default is not provided.

First note that the CPython documentation says that this function may
raise a TypeError, so if you are seeing it, it means that the program
you are using is not correctly handling this case.

On PyPy, though, it always raises TypeError.  Before looking for
alternatives, please take a moment to read the following explanation as
to why it is the case.  What you are looking for may not be possible.

A memory profiler using this function is most likely to give results
inconsistent with reality on PyPy.  It would be possible to have
sys.getsizeof() return a number (with enough work), but that may or
may not represent how much memory the object uses.  It doesn't even
make really sense to ask how much *one* object uses, in isolation
with the rest of the system.  For example, instances have maps,
which are often shared across many instances; in this case the maps
would probably be ignored by an implementation of sys.getsizeof(),
but their overhead is important in some cases if they are many
instances with unique maps.  Conversely, equal strings may share
their internal string data even if they are different objects---or
empty containers may share parts of their internals as long as they
are empty.  Even stranger, some lists create objects as you read
them; if you try to estimate the size in memory of range(10**6) as
the sum of all items' size, that operation will by itself create one
million integer objects that never existed in the first place.

builder: pypy-c-jit-macos-arm64 build #1306+
test: lib-python/3/test/test_marshal.py::unmodified