-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. #8262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -4,18 +4,29 @@ | |||
class FLUFLTests(unittest.TestCase): | |||
|
|||
def test_barry_as_bdfl(self): | |||
code = "from __future__ import barry_as_FLUFL; 2 {0} 3" | |||
code = "from __future__ import barry_as_FLUFL\n2 {0} 3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar with compile
. My question is when flags
is passed, what's the meaning of the import
here? Is it a must?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is redundant if flags is passed.
The bug is that this tests is failed if not pass flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know flags have to be passed. I just don't understand why not simply '2 {0} 3'
?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention of the test is that from __future__ import barry_as_FLUFL
should change grammar. But this doesn't work, and we need to pass flags as a temporary workaround. After fixing this bug we could remove flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha. I wrongly thought the from __future__ import ...
doesn't work in compile
and flags
must be passed.
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
…r egg. (pythonGH-8262) (cherry picked from commit aba24ff) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-8423 is a backport of this pull request to the 3.7 branch. |
…r egg. (pythonGH-8262) (cherry picked from commit aba24ff) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-8424 is a backport of this pull request to the 3.6 branch. |
…r egg. (GH-8262) (GH-8423) (cherry picked from commit aba24ff) Co-authored-by: Serhiy Storchaka <[email protected]>
…r egg. (GH-8262) (GH-8424) (cherry picked from commit aba24ff) Co-authored-by: Serhiy Storchaka <[email protected]>
https://bugs.python.org/issue34084