This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients benjamin.peterson, eryksun, iritkatriel, jwilk, loewis, ncoghlan, r.david.murray, serhiy.storchaka, vstinner
Date 2021-12-01.00:45:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638319537.69.0.980601947514.issue19941@roundup.psfhosted.org>
In-reply-to
Content
I confirm: Python 3.10 works as expected.

Python 3.10 fails with the same SyntaxError using "python script.py" or "python -m script" if the script contains non-ASCII characters but is not encoded to UTF-8.

vstinner@apu$ python3 test.py
  File "/home/vstinner/test.py", line 1
    print('�Hello world!')
                         ^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte

vstinner@apu$ python3 -m test
Traceback (most recent call last):
  (...)
  File "/home/vstinner/test.py", line 1
    print('�Hello world!')
                         ^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte
History
Date User Action Args
2021-12-01 00:45:37vstinnersetrecipients: + vstinner, loewis, ncoghlan, benjamin.peterson, jwilk, r.david.murray, serhiy.storchaka, eryksun, iritkatriel
2021-12-01 00:45:37vstinnersetmessageid: <1638319537.69.0.980601947514.issue19941@roundup.psfhosted.org>
2021-12-01 00:45:37vstinnerlinkissue19941 messages
2021-12-01 00:45:37vstinnercreate