Repository navigation
Count the complete Windows locale encoding suffix - #9065
Conversation
Include modifiers in the 15-byte bound before calling the CRT, matching Python 3.14. Assisted-by: OpenAI Codex:model identifier unavailable
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to Overlong Windows locale suffixes, including modifier bytes, are rejected for LC_CTYPE and LC_ALL. No concrete code blocker is evident; complete the stated hosted Windows validation before considering platform validation complete. Pre-merge checks |
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e7e7e5cfd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (locale.LC_CTYPE, "English.1252@" + "x" * 16), | ||
| (locale.LC_ALL, "LC_CTYPE=English.1252@" + "x" * 16), |
There was a problem hiding this comment.
Remove the prohibited new locale test
This new snippet adds test logic and data, but the root AGENTS.md restricts test-file changes to adding or removing expected-failure decorators and associated TODO comments; these new LC_CTYPE/LC_ALL cases therefore violate the repository's critical test-modification policy and should be removed from this change.
AGENTS.md reference: AGENTS.md:L273-L279
Useful? React with 👍 / 👎.
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Extract the Python 3.14-compatible Windows locale suffix guard from #8954.
Count every byte after the first dot toward the existing 15-byte encoding-name limit, including an
@modifier. The existing LC_ALL helper still validates semicolon-separated components individually. This matches CPython 3.14.7 and 3.14.8, which reject before calling the CRT.The original guard from #6416 incorrectly stopped counting at
@. Existing canonical long-encoding tests cover other suffix lengths; the small Python snippet adds only the missing modifier cases for LC_CTYPE and LC_ALL. Both test strings exceed the guard and cannot reach the CRT with this fix.Validation and platform limits
-D warnings. Hosted Windows build and snippet results are required before treating platform validation as complete.No locale setting is changed by the new regression cases. No canonical assertions, README wording, or implementation-name guards are changed.
Summary by CodeRabbit
LC_CTYPEorLC_ALLto a locale name with an overlong encoding portion now raises the expected “unsupported locale setting” error. The length check includes the full portion after the period, including any modifier suffix, so these invalid settings are rejected consistently.