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.

classification
Title: SystemError in compile builtin function
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, Zac Hatfield-Dodds, lys.nikolaou, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-10-31 11:16 by Zac Hatfield-Dodds, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23058 closed BTaskaya, 2020-10-31 12:06
PR 23065 merged lys.nikolaou, 2020-10-31 17:40
PR 23066 merged lys.nikolaou, 2020-10-31 18:37
Messages (5)
msg380053 - (view) Author: Zac Hatfield-Dodds (Zac Hatfield-Dodds) * Date: 2020-10-31 11:16
In Python 3.9.0, running

    compile('A.\u018a\\ ', '<string>', 'single')

raises

    SystemError: <built-in function normalize> returned a result with an error set

This is obviously invalid syntax, but it would still be nice to raise SyntaxError for that and the SystemError may be symptomatic of a bug.  Unfortunately I have no insight to offer beyond this hand-minimised reproducer :-/
msg380063 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-10-31 13:34
Nice catch Zac!
msg380088 - (view) Author: Lysandros Nikolaou (lys.nikolaou) * (Python committer) Date: 2020-10-31 18:31
New changeset 02cdfc93f82fecdb7eae97a868d4ee222b9875d9 by Lysandros Nikolaou in branch 'master':
bpo-42218: Correctly handle errors in left-recursive rules (GH-23065)
https://github.com/python/cpython/commit/02cdfc93f82fecdb7eae97a868d4ee222b9875d9
msg380090 - (view) Author: miss-islington (miss-islington) Date: 2020-10-31 19:06
New changeset cfcb952e30e01d7cce430829af8edc7afc94e0b1 by Lysandros Nikolaou in branch '3.9':
[3.9] bpo-42218: Correctly handle errors in left-recursive rules (GH-23065) (GH-23066)
https://github.com/python/cpython/commit/cfcb952e30e01d7cce430829af8edc7afc94e0b1
msg380113 - (view) Author: Zac Hatfield-Dodds (Zac Hatfield-Dodds) * Date: 2020-11-01 04:14
Wow!  Thanks and congrats on the super-fast fix :-)


FYI Paul Ganssle has recently [1] started to work on adding property-based tests to CPython CI [2].  Once Paul gets the stubs and first set of tests working, I'll start moving the others over from my demo repo [3] to CPython master so we catch this kind of bug earlier in future.

[1] https://bugs.python.org/issue42109; see also https://bugs.python.org/issue38953
[2] https://pyfound.blogspot.com/2020/05/property-based-testing-for-python.html
[3] https://github.com/Zac-HD/stdlib-property-tests
History
Date User Action Args
2022-04-11 14:59:37adminsetgithub: 86384
2020-11-01 04:14:56Zac Hatfield-Doddssetmessages: + msg380113
2020-10-31 19:06:57lys.nikolaousetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-10-31 19:06:11miss-islingtonsetnosy: + miss-islington
messages: + msg380090
2020-10-31 18:37:31lys.nikolaousetpull_requests: + pull_request21985
2020-10-31 18:31:48lys.nikolaousetmessages: + msg380088
2020-10-31 17:40:48lys.nikolaousetnosy: + lys.nikolaou
pull_requests: + pull_request21984
2020-10-31 13:34:17serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg380063
2020-10-31 12:06:44BTaskayasetkeywords: + patch
stage: patch review
pull_requests: + pull_request21977
2020-10-31 11:17:34BTaskayasetnosy: + BTaskaya
2020-10-31 11:16:42Zac Hatfield-Doddscreate