Skip to content

gh-126004: fix positions handling in codecs.replace_errors - #127674

Merged
picnixz merged 17 commits into
python:mainfrom
picnixz:fix/codecs/replace-errors-126004
Jan 23, 2025
Merged

gh-126004: fix positions handling in codecs.replace_errors#127674
picnixz merged 17 commits into
python:mainfrom
picnixz:fix/codecs/replace-errors-126004

Conversation

@picnixz

@picnixzpicnixz commented Dec 6, 2024

Copy link
Copy Markdown
Member

Comment threadPython/codecs.c Outdated
@picnixz
picnixz requested a review from encukouJanuary 3, 2025 18:39
Comment threadPython/codecs.c Outdated
@picnixz
picnixz requested a review from encukouJanuary 22, 2025 11:13

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment threadPython/codecs.c Outdated
Comment threadPython/codecs.c Outdated
Comment threadPython/codecs.c Outdated
@picnixz
picnixz merged commit 225296c into python:mainJan 23, 2025
@picnixz
picnixz deleted the fix/codecs/replace-errors-126004 branch January 23, 2025 10:44
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot iOS ARM64 Simulator 3.x has failed when building commit 225296c.

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

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

==

Click to see traceback logs
Traceback (most recent call last):

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot aarch64 Android 3.x has failed when building commit 225296c.

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

Failed tests:

  • test_android

Failed subtests:

  • test_bytes - test.test_android.TestAndroidOutput.test_bytes

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

==

Click to see traceback logs
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.14/test/test_android.py", line 63, in assert_log
line =self.logcat_queue.get(timeout=(deadline - time()))
File "/data/user/0/org.python.testbed/files/python/lib/python3.14/queue.py", line 212, in getraise Empty
_queue.Empty
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/runners.py", line 118, in runreturnself._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 687, in run_until_completereturn future.result()
^^^^^^^^^^^^^^^
File "/Volumes/InternalDisk/Users/android/buildarea/3.x.mhsmith-android-aarch64/build/Android/android.py", line 531, in run_testbedasyncwith asyncio.TaskGroup() as tg:
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/taskgroups.py", line 134, in __aexit__raise propagate_cancellation_error
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/taskgroups.py", line 110, in __aexit__awaitself._on_completed_fut
asyncio.exceptions.CancelledError
Traceback (most recent call last):
File "/data/user/0/org.python.testbed/files/python/lib/python3.14/test/test_android.py", line 53, in setUpself.assert_log("I", tag, message, skip=True, timeout=5)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/user/0/org.python.testbed/files/python/lib/python3.14/test/test_android.py", line 65, in assert_logself.fail(f"line not found: {expected!r}")
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError: line not found: 'test.test_android.TestAndroidOutput.test_bytes 1737630241.1795416'

@picnixz

Copy link
Copy Markdown
MemberAuthor

The iOS failures seem unrelated though I cannot confirm and the Android failure may be related so I'll check

@picnixz

Copy link
Copy Markdown
MemberAuthor

The code that seems to fail is:

self.assertEqual(write_len, stream.write(b))
iflinesisNone:
lines= [b.decode()]
self.assert_logs(level, tag, lines)

However, we're using a strictor a backslashreplace error handler in b.decode() and the logcat process:

defsetUp(self):
self.logcat_process=subprocess.Popen(
["logcat", "-v", "tag"], stdout=subprocess.PIPE,
errors="backslashreplace"
)

so I don't know how it was affected by this change. I'll rerun the build bot for this one and if it still fails, I'll revert the PR.

@picnixz

Copy link
Copy Markdown
MemberAuthor

!buildbot aarch64 Android 3.x

@bedevere-bot

Copy link
Copy Markdown

The regex 'aarch64 Android 3.x' did not match any buildbot builder. Is the requested builder in the list of stable builders?

@picnixz

picnixz commented Jan 23, 2025

Copy link
Copy Markdown
MemberAuthor

Nevermind, the two build bots are actually green on the latest main ¯\_(ツ)_/¯

@mhsmith

Copy link
Copy Markdown
Member

I'm not sure what happened with the iOS buildbot, but the Android failure is a known problem: #124666.

@picnixz

picnixz commented Jan 23, 2025

Copy link
Copy Markdown
MemberAuthor

Thank you for confirming this. iOS build bot seems to never run so it could be a network issue or build bot issue.

@mhsmith

Copy link
Copy Markdown
Member

The iOS buildbot had some issues recently (#129200), but it should be back to normal now. This particular failure is one I haven't seen before – it looks like it passed the test suite and then crashed at the end.

Sign up for freeto 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.

5 participants

@picnixz@bedevere-bot@mhsmith@vstinner@encukou