FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. by serhiy-storchaka · Pull Request #8262 · python/cpython · GitHub

/ cpython Public

bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. - #8262

Merged
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:flufl
Jul 23, 2018
Merged

bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg.#8262
serhiy-storchaka merged 1 commit into
python:masterfrom
serhiy-storchaka:flufl

Conversation

serhiy-storchaka commented Jul 12, 2018
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

Comment thread Lib/test/test_flufl.py

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It is redundant if flags is passed.

The bug is that this tests is failed if not pass flags.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I know flags have to be passed. I just don't understand why not simply '2 {0} 3'?.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

gotcha. I wrongly thought the from __future__ import ... doesn't work in compile and flags must be passed.

Copy link
Copy Markdown
Contributor

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

serhiy-storchaka deleted the flufl branch July 23, 2018 20:41
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 23, 2018
…r egg. (pythonGH-8262)

(cherry picked from commit aba24ff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Copy link
Copy Markdown

GH-8423 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 23, 2018
…r egg. (pythonGH-8262)

(cherry picked from commit aba24ff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Copy link
Copy Markdown

GH-8424 is a backport of this pull request to the 3.6 branch.

serhiy-storchaka added a commit that referenced this pull request Jul 23, 2018
…r egg. (GH-8262) (GH-8423)

(cherry picked from commit aba24ff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jul 23, 2018
…r egg. (GH-8262) (GH-8424)

(cherry picked from commit aba24ff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL