Skip to content

gh-155742: Use PyBytesWriter in codeobject.c - #157345

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:codeobj
Sep 12, 2026
Merged

vstinner merged 1 commit into
python:mainfrom
vstinner:codeobj

Conversation

@vstinner

@vstinner vstinner commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Replace soft deprecated _PyBytes_Resize() with PyBytesWriter.

Replace soft deprecated _PyBytes_Resize() with PyBytesWriter.
@vstinner
vstinner merged commit 7b17157 into python:main Sep 12, 2026
55 checks passed
@vstinner
vstinner deleted the codeobj branch September 12, 2026 03:43
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Windows PGO 3.x (tier-1) has failed when building commit 7b17157.

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/1620/builds/4426) and take a look at the build logs.
  4. Check if the failure is related to this commit (7b17157) 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/1620/builds/4426

Failed tests:

  • test.test_asyncio.test_sslproto

Failed subtests:

  • test_shutdown_corrupted_ssl_sends_close_notify - test.test_asyncio.test_sslproto.SelectorStartTLSTests.test_shutdown_corrupted_ssl_sends_close_notify

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

==

Click to see traceback logs
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\threading.py", line 1218, in _bootstrap_inner
    self._context.run(self.run)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 227, in run
    self._run()
    ~~~~~~~~~^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 261, in _run
    self._test._abort_socket_test(ex)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 110, in _abort_socket_test
    self.fail(ex)
    ~~~~~~~~~^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\unittest\case.py", line 772, in fail
    raise self.failureException(msg)
AssertionError: [WinError 10054] An existing connection was forcibly closed by the remote host
ERROR


Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 255, in _run
    self._handle_client(conn)
    ~~~~~~~~~~~~~~~~~~~^^^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 264, in _handle_client
    self._prog(TestSocketWrapper(sock))
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\test_sslproto.py", line 920, in server
    sock.unwrap()
    ~~~~~~~~~~~^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\ssl.py", line 1402, in unwrap
    s = self._sslobj.shutdown()
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host


Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\threading.py", line 1218, in _bootstrap_inner
    self._context.run(self.run)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 227, in run
    self._run()
    ~~~~~~~~~^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 261, in _run
    self._test._abort_socket_test(ex)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\functional.py", line 110, in _abort_socket_test
    self.fail(ex)
    ~~~~~~~~~^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\unittest\case.py", line 772, in fail
    raise self.failureException(msg)
AssertionError: [WinError 10054] An existing connection was forcibly closed by the remote host
k


Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\test\test_asyncio\test_sslproto.py", line 950, in test_shutdown_corrupted_ssl_sends_close_notify
    self.loop.run_until_complete(client(srv.addr))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10.pgo\build\Lib\asyncio\base_events.py", line 723, in run_until_complete
    raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.
clin1234 pushed a commit to clin1234/cpython that referenced this pull request Sep 12, 2026
Replace soft deprecated _PyBytes_Resize() with PyBytesWriter.
johnslavik pushed a commit to johnslavik/cpython that referenced this pull request Sep 14, 2026
Replace soft deprecated _PyBytes_Resize() with PyBytesWriter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants