GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-126004: fix positions handling in `codecs.replace_errors` by picnixz · Pull Request #127674 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented Dec 6, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Incorrect handling of start and end values in codecs error handlers #126004

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
picnixz added 2 commits December 6, 2024 11:32
@picnixz
fix codecs.replace_errors
6dbcdea
@picnixz
blurb
193c051
@bedevere-app bedevere-app Bot mentioned this pull request Dec 6, 2024
Incorrect handling of start and end values in codecs error handlers #126004
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Dec 6, 2024
picnixz added 3 commits December 6, 2024 11:47
@picnixz
fix tests
a9140f5
@picnixz
fix tests
98db6a2
@picnixz
cosmetic changes
37ffb43
encukou
encukou reviewed Dec 6, 2024
View reviewed changes
Comment thread Python/codecs.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz mentioned this pull request Dec 10, 2024
Refactor PyUnicodeError internal C helpers #127787
Closed
picnixz added 3 commits January 3, 2025 14:10
@picnixz
Merge remote-tracking branch 'upstream/main' into fix/codecs/replace-…
4c20312
…errors-126004
@picnixz
use internal _PyUnicodeError_GetParams helper
4fe70a0
@picnixz
fixup
24bb030
@picnixz
picnixz requested a review from encukou January 3, 2025 18:39
encukou
encukou reviewed Jan 6, 2025
View reviewed changes
Comment thread Python/codecs.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz added 4 commits January 14, 2025 11:19
@picnixz
Merge branch 'main' into fix/codecs/replace-errors-126004
5fa095b
@picnixz
Merge branch 'main' into fix/codecs/replace-errors-126004
f1c6339
@picnixz
update usages of _PyUnicodeError_GetParams
31235a7
@picnixz
amend some cosmetic changes to be consistent
7626ceb
@picnixz
picnixz requested a review from encukou January 22, 2025 11:13
vstinner
vstinner approved these changes Jan 22, 2025
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Python/codecs.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/codecs.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jan 22, 2025
picnixz added 3 commits January 22, 2025 12:54
@picnixz
Merge branch 'main' into fix/codecs/replace-errors-126004
fbe1930
@picnixz
remove unnecessary cast and comment
306b8f6
@picnixz
use memset instead of a for-loop
d71b3a5
picnixz
picnixz commented Jan 22, 2025
View reviewed changes
Comment thread Python/codecs.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz added 2 commits January 22, 2025 14:44
@picnixz
Revert "use memset instead of a for-loop"
39951be
This reverts commit d71b3a5.
@picnixz
Merge branch 'main' into fix/codecs/replace-errors-126004
b8ea97b
@picnixz
picnixz merged commit 225296c into python:main Jan 23, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Jan 23, 2025
@picnixz
picnixz deleted the fix/codecs/replace-errors-126004 branch January 23, 2025 10:44
@bedevere-bot

bedevere-bot commented Jan 23, 2025

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):
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jan 23, 2025

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 get
    raise 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 run
    return self._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_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Volumes/InternalDisk/Users/android/buildarea/3.x.mhsmith-android-aarch64/build/Android/android.py", line 531, in run_testbed
    async with 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__
    await self._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 setUp
    self.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_log
    self.fail(f"line not found: {expected!r}")
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: line not found: 'test.test_android.TestAndroidOutput.test_bytes 1737630241.1795416'
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Jan 23, 2025

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Jan 23, 2025

Copy link
Copy Markdown
Member Author

The code that seems to fail is:

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

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

    def setUp(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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Jan 23, 2025

Copy link
Copy Markdown
Member Author

!buildbot aarch64 Android 3.x

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jan 23, 2025

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Jan 23, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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

vstinner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith

mhsmith commented Jan 23, 2025

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 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Jan 23, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mhsmith

mhsmith commented Jan 23, 2025

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@vstinner vstinner vstinner approved these changes
@encukou encukou Awaiting requested review from encukou

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@picnixz @bedevere-bot @mhsmith @vstinner @encukou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.