Skip to content

gh-154592: Fix test_peg_generator in non-UTF-8 locales with a non-ASCII work dir#154593

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:peg-generator-nonascii-workdir
Jul 24, 2026
Merged

gh-154592: Fix test_peg_generator in non-UTF-8 locales with a non-ASCII work dir#154593
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:peg-generator-nonascii-workdir

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

setUpClass creates a venv in the regrtest working directory — whose name has a non-ASCII suffix (os_helper.FS_NONASCII, æ on Windows) — then runs a child printing sysconfig.get_path(). In a non-UTF-8 locale whose encoding cannot encode that character (e.g. cp932 or cp1251 on Windows), the child fails to encode the path. Force UTF-8 for the child.

…on-ASCII work dir

setUpClass created a venv in the regrtest working directory (whose name has a
non-ASCII suffix) and ran a child printing sysconfig.get_path().  In a locale
whose encoding cannot encode that character, the child failed to encode the
path.  Force UTF-8 for the child.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 24, 2026
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news labels Jul 24, 2026
@serhiy-storchaka
serhiy-storchaka merged commit da46947 into python:main Jul 24, 2026
59 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@serhiy-storchaka
serhiy-storchaka deleted the peg-generator-nonascii-workdir branch July 24, 2026 12:20
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker da46947470013f3e36221bfc6b73c10725a95c8b 3.14

@bedevere-app

bedevere-app Bot commented Jul 24, 2026

Copy link
Copy Markdown

GH-154598 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 24, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker da46947470013f3e36221bfc6b73c10725a95c8b 3.13

@bedevere-app

bedevere-app Bot commented Jul 24, 2026

Copy link
Copy Markdown

GH-154602 is a backport of this pull request to the 3.14 branch.

@bedevere-app

bedevere-app Bot commented Jul 24, 2026

Copy link
Copy Markdown

GH-154603 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 24, 2026
serhiy-storchaka added a commit that referenced this pull request Jul 24, 2026
…non-ASCII work dir (GH-154593) (GH-154602)

(cherry picked from commit da46947)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant