bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided#29582
Conversation
…gs are not provided
ammaraskar
left a comment
There was a problem hiding this comment.
|
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
|
Sorry, @pablogsal, I could not cleanly backport this to |
|
Sorry @pablogsal, I had trouble checking out the |
| if (the_string == NULL) { | ||
| return NULL; | ||
| } | ||
| return Py_CompileString(the_string, "blech", Py_file_input); |
There was a problem hiding this comment.
| return Py_CompileString(the_string, "blech", Py_file_input); | |
| return Py_CompileString(the_string, "<string>", Py_file_input); |
So it matches the test.
…gs are not provided (pythonGH-29582) (cherry picked from commit da20d74)
|
GH-29585 is a backport of this pull request to the 3.9 branch. |
… if flags are not provided (pythonGH-29582). (cherry picked from commit da20d74) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
GH-29586 is a backport of this pull request to the 3.10 branch. |
| with self.assertRaises(TypeError): | ||
| increment_count(1, 2, 3) | ||
|
|
||
| def test_Py_CompileString(self): |
There was a problem hiding this comment.
Actually, while backporting this patch to our internal 3.9, I noticed this test method is in the wrong class. It should be in the CAPITest class.
There was a problem hiding this comment.
I will submit a fix today
…gs are not provided (pythonGH-29582)
https://bugs.python.org/issue45822