Skip to content

gh-158660: Add PyListBuilder to the limited C API - #162965

Merged
vstinner merged 3 commits into
python:mainfrom
vstinner:list_builder_limited
Dec 2, 2026
Merged

vstinner merged 3 commits into
python:mainfrom
vstinner:list_builder_limited

Conversation

@vstinner

@vstinner vstinner commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Move PyListBuilder tests from _testcapi to _testlimitedcapi.

Move PyListBuilder tests from _testcapi to _testlimitedcapi.
@read-the-docs-community

read-the-docs-community Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

📖 4 files modified


Preview · build overview · cpython-previews · built Dec. 1, 2026, 11:54 p.m. UTC

Use PyObject_GetTypeData() and avoid PyObject_HEAD.
@vstinner
vstinner enabled auto-merge (squash) December 2, 2026 00:31
@vstinner
vstinner merged commit e2fc103 into python:main Dec 2, 2026
105 of 109 checks passed
@vstinner
vstinner deleted the list_builder_limited branch December 2, 2026 00:46
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable Refleaks 3.x (tier-3) has failed when building commit e2fc103.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1641/builds/2984) and take a look at the build logs.
  4. Check if the failure is related to this commit (e2fc103) or if it is a false positive.
  5. 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/1641/builds/2984

Failed tests:

  • test_multiprocessing_fork.test_processes
  • test_os.test_os
  • test_profiling

Failed subtests:

  • test_fork - test.test_multiprocessing_fork.test_processes.WithProcessesTestQueue.test_fork
  • test_timerfd_poll - test.test_os.test_os.TimerfdTests.test_timerfd_poll

Test leaking resources:

  • test_profiling: memory blocks

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/_test_multiprocessing.py", line 1361, in test_fork
    self.assertEqual(queue.get(), i)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: 10 != 1


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_os/test_os.py", line 4437, in test_timerfd_poll
    self.check_timerfd_poll(False)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_os/test_os.py", line 4425, in check_timerfd_poll
    self.assertEqual(self.read_count_signaled(fd), 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 2 != 1


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/multiprocessing/process.py", line 320, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/_test_multiprocessing.py", line 579, in _sleep_some_event
    time.sleep(100)
    ~~~~~~~~~~^^^^^
KeyboardInterrupt
k


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/sample.py", line 87, in __init__
    self.unwinder = self._new_unwinder(native, gc, opcodes, skip_non_matching_threads)
                    ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/sample.py", line 102, in _new_unwinder
    return _remote_debugging.RemoteUnwinder(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.pid,
        ^^^^^^^^^
    ...<7 lines>...
        **kwargs
        ^^^^^^^^
    )
    ^
RuntimeError: Failed to find the PyRuntime section in process 1255946 on Linux platform


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_profiling/test_sampling_profiler/test_live_collector_ui.py", line 904, in test_run_failed_script_live
    main()
    ~~~~^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/cli.py", line 1020, in main
    _main()
    ~~~~~^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/cli.py", line 1176, in _main
    handler(args)
    ~~~~~~~^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/cli.py", line 1281, in _handle_run
    _handle_live_run(args)
    ~~~~~~~~~~~~~~~~^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/cli.py", line 1415, in _handle_live_run
    sample_live(
    ~~~~~~~~~~~^
        process.pid,
        ^^^^^^^^^^^^
    ...<9 lines>...
        blocking=args.blocking,
        ^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/sample.py", line 616, in sample_live
    profiler = SampleProfiler(
        pid,
    ...<8 lines>...
        blocking=blocking,
    )
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/profiling/sampling/sample.py", line 89, in __init__
    raise SystemExit(err) from err
SystemExit: Failed to find the PyRuntime section in process 1255946 on Linux platform


Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/contextlib.py", line 116, in inner
    return func(*args, **kwds)
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.x.cstratak-fedora-stable-s390x.refleak/build/Lib/test/_test_multiprocessing.py", line 1361, in test_fork
    self.assertEqual(queue.get(), i)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
AssertionError: 10 != 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants