File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed
Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Debug Unicode Crash
2+
3+ on :
4+ push :
5+
6+ jobs :
7+ debug-unicode :
8+ runs-on : windows-latest
9+ strategy :
10+ matrix :
11+ python : ["3.14"]
12+ architecture : [x86, x64]
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - uses : actions/setup-python@v4
17+ with :
18+ python-version : ${{ matrix.python }}
19+ architecture : ${{ matrix.architecture }}
20+
21+ - name : Run minimal Unicode test
22+ run : python debug_unicode.py
23+
24+ - name : Run with pytest
25+ run : |
26+ pip install pytest
27+ pytest debug_unicode.py -v
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ """Minimal reproduction for Windows x86 Unicode crash"""
3+
4+ import warnings
5+ import sys
6+
7+ def test_unicode_warning ():
8+ """Test that triggers Unicode in warnings system"""
9+ unicode_string = "\U00010002 abc--abc\u79d8 \u5bc6 \u4ee3 \u7801 -\u79d8 \u5bc6 \u4ee3 \u7801 "
10+
11+ print (f"Python version: { sys .version } " )
12+ print (f"Platform: { sys .platform } " )
13+ print (f"Architecture: { sys .maxsize > 2 ** 32 } " )
14+ print (f"Unicode string: { repr (unicode_string )} " )
15+
16+ # Trigger a warning with Unicode content
17+ warnings .warn (f"Test warning with Unicode: { unicode_string } " )
18+
19+ print ("Test completed successfully" )
20+
21+ if __name__ == "__main__" :
22+ test_unicode_warning ()
You can’t perform that action at this time.
0 commit comments