gh-133516: Raise ValueError when constants True, False or None are used as an identifier after NFKC normalization#133523
Conversation
Misc/NEWS.d/next/Core_and_Builtins/2025-05-06-15-01-41.gh-issue-133516.RqWVf2.rst
Outdated
Show resolved
Hide resolved
Add dot to end Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
|
Actually, wait a minute--@pablogsal, could you reproduce this on main or 3.13? I can't with either the test case or the reproducer provided in the issue. I don't see how this could possibly be platform-dependent. |
Humm good point. In macOS I am seeing this: |
|
Is hitting this assert: Line 3187 in a4be3bc maybe we don't have asserts compiled in? But debug mode should not optimize them away.... |
Using Lines 976 to 986 in 3dfed23 But if only asserts are enabled, then there is no AST validation |
|
Thanks @TERESH1 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
|
Sorry, @TERESH1 and @pablogsal, I could not cleanly backport this to |
|
Thanks @TERESH1 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
GH-133596 is a backport of this pull request to the 3.14 branch. |
@TERESH1 can you do the backpory following this instruction? |
|
GH-133615 is a backport of this pull request to the 3.13 branch. |
…lse` or `None` are used as an identifier after NFKC normalization (pythonGH-133523) (cherry picked from commit d9b0b07)
…lse` or `None` are used as an identifier after NFKC normalization (pythonGH-133523) (cherry picked from commit d9b0b07)
… `None` are used as an identifier after NFKC normalization (python#133523)
#133516