Skip to content

gh-154863: Check the encoded bytes in the shift state flush test - #155128

Merged
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:gh-154863-flush-test-bytes
Aug 4, 2026
Merged

gh-154863: Check the encoded bytes in the shift state flush test#155128
serhiy-storchaka merged 2 commits into
python:mainfrom
serhiy-storchaka:gh-154863-flush-test-bytes

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 3, 2026

Copy link
Copy Markdown
Member

The test decoded the output back and checked the ASCII in the result, so it tested the decoder too. On macOS 15 the round-trip of 'ABC中DEF' in ISO-2022-CN and ISO-2022-CN-EXT returns '?DEF', and the test fails on the ARM64 MacOS M1 NoGIL 3.x buildbots. macOS 13 and 26, glibc and GNU libiconv are not affected.

The ASCII is written to the output as is, so checking it in the encoded bytes tests only the encoder, which is what the test is about. Comparing with the same text without the character also detects a character encoded as nothing, which neither the old nor a simpler new check would catch.

The failure message will now show the encoded bytes, so the next run on that buildbot tells whether the encoder or the decoder loses the text there.

The test decoded the output back and checked the ASCII in the result, so
it tested the decoder too. The ASCII is written to the output as is, so
checking it there tests only the encoder. Comparing with the same text
without the character also detects a character encoded as nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

!buildbot ARM64 MacOS M1 NoGIL

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit ce1e701 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F155128%2Fmerge

The command will test the builders whose names match following regular expression: ARM64 MacOS M1 NoGIL

The builders matched are:

  • ARM64 MacOS M1 NoGIL PR

Its iconv writes the fallback for an unencodable character at the start
of the converted batch, over the ASCII already converted there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

!buildbot ARM64 MacOS M1 NoGIL

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit c81bc1d 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F155128%2Fmerge

The command will test the builders whose names match following regular expression: ARM64 MacOS M1 NoGIL

The builders matched are:

  • ARM64 MacOS M1 NoGIL PR

@serhiy-storchaka
serhiy-storchaka merged commit 679ff3a into python:main Aug 4, 2026
48 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the gh-154863-flush-test-bytes branch August 4, 2026 05:23
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot AMD64 Arch Linux Perf 3.x (tierless) has failed when building commit 679ff3a.

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

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

Click to see traceback logs
Note: switching to '679ff3af833d9a0e508e45523fa081b3480725cb'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 679ff3af833d9 gh-154863: Check the encoded bytes in the shift state flush test (GH-155128)
Switched to and reset branch 'main'

/usr/bin/ld: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make: *** [Makefile:1892: Programs/_freeze_module] Error 1

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [Makefile:3475: clean-retain-profile] Error 1 (ignored)

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

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants