Skip to content

Expect alternate errors in test_file_surrogates()#2946

Merged
Rowlando13 merged 1 commit into
mainfrom
unknown repository
May 26, 2025
Merged

Expect alternate errors in test_file_surrogates()#2946
Rowlando13 merged 1 commit into
mainfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented May 25, 2025

Not all file systems trigger a FileNotFoundError when encountering surrogates. Inside Podman the file system triggers an OSError: [Errno 84] Illegal byte sequence: '\udcff'.

fixes #2945

@ghost ghost force-pushed the file-system-assumption branch from e8fa99d to dce8a31 Compare May 25, 2025 21:45
@Rowlando13
Copy link
Copy Markdown
Collaborator

Thanks for the PR! Can use please add a comment that specifies the FileNotFoundError as the common case and the OsError as a special case for podman.

Not all file systems trigger a FileNotFoundError when encountering surrogates. Inside Podman the file system triggers an `OSError: [Errno 84] Illegal byte sequence: '\udcff'`.
@ghost ghost force-pushed the file-system-assumption branch from dce8a31 to 7559bb8 Compare May 26, 2025 11:33
@ghost
Copy link
Copy Markdown
Author

ghost commented May 26, 2025

Thanks for the PR! Can use please add a comment that specifies the FileNotFoundError as the common case and the OsError as a special case for podman.

I tried a few filesystems that supposedly should not handle surrogates, but all of them work. Even overlayfs (which is used in podman), so the only explanation seems to be, that in rootless podman it passes through a user-space program (FUSE). Let me know if that comment is too detailed.

@Rowlando13
Copy link
Copy Markdown
Collaborator

Looks good.

@Rowlando13 Rowlando13 merged commit b63239d into pallets:main May 26, 2025
10 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 10, 2025
@kdeldycke kdeldycke added this to the 8.2.2 milestone Aug 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_file_surrogates() covers not all file-system types

2 participants